pub struct RwQueue { /* private fields */ }
Expand description
async future thread safe queue for Rwlock
Implementations§
source§impl RwQueue
impl RwQueue
pub fn new() -> RwQueue
sourcepub fn sync_write_run<A, R>(&self, call: impl FnOnce(A) -> R, arg: A) -> R
pub fn sync_write_run<A, R>(&self, call: impl FnOnce(A) -> R, arg: A) -> R
Sync write run fn Note: it is not based on fair lock. It will never be called when the queue has unprocessed
sourcepub fn sync_read_run<A, R>(&self, call: impl FnOnce(A) -> R, arg: A) -> R
pub fn sync_read_run<A, R>(&self, call: impl FnOnce(A) -> R, arg: A) -> R
Sync run fn Note: it is not based on fair lock. It will never be called when the queue has unprocessed
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RwQueue
impl Send for RwQueue
impl Sync for RwQueue
impl Unpin for RwQueue
impl UnwindSafe for RwQueue
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more