pub struct BusyWait {}Expand description
Thus spins in a loop on the queue waiting for a value to be ready
Implementations§
Trait Implementations§
Source§impl Wait for BusyWait
impl Wait for BusyWait
Source§fn wait(&self, seq: usize, w_pos: &AtomicUsize, wc: &AtomicUsize)
fn wait(&self, seq: usize, w_pos: &AtomicUsize, wc: &AtomicUsize)
Causes the reader to block until the queue is available. Is passed
the queue tag which the readers are waiting on, a reference to the
corresponding AtomicUsize, and a reference to the number of writers
Source§fn needs_notify(&self) -> bool
fn needs_notify(&self) -> bool
Returns whether writers need to call notify
Optimized the various BusyWait variants
impl Copy for BusyWait
impl Send for BusyWait
impl Sync for BusyWait
Auto Trait Implementations§
impl Freeze for BusyWait
impl RefUnwindSafe for BusyWait
impl Unpin for BusyWait
impl UnwindSafe for BusyWait
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