[][src]Trait multiqueue2::wait::Wait

pub trait Wait {
    pub fn wait(&self, _: usize, _: &AtomicUsize, _: &AtomicUsize);
pub fn notify(&self);
pub fn needs_notify(&self) -> bool; }

This is the trait that something implements to allow receivers to block waiting for more data.

Required methods

pub fn wait(&self, _: usize, _: &AtomicUsize, _: &AtomicUsize)[src]

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

pub fn notify(&self)[src]

Called by writers to awaken waiting readers

pub fn needs_notify(&self) -> bool[src]

Returns whether writers need to call notify Optimized the various BusyWait variants

Loading content...

Implementors

impl Wait for BlockingWait[src]

impl Wait for BusyWait[src]

impl Wait for YieldingWait[src]

Loading content...