Trait multiqueue::wait::Wait [−][src]
pub trait Wait {
fn wait(&self, _: usize, _: &AtomicUsize, _: &AtomicUsize);
fn notify(&self);
fn needs_notify(&self) -> bool;
}Expand description
This is the trait that something implements to allow receivers to block waiting for more data.
Required methods
fn wait(&self, _: usize, _: &AtomicUsize, _: &AtomicUsize)
fn wait(&self, _: usize, _: &AtomicUsize, _: &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
fn needs_notify(&self) -> bool
fn needs_notify(&self) -> bool
Returns whether writers need to call notify Optimized the various BusyWait variants
