Module multiqueue::wait
[−]
[src]
This module contains the waiting strategies used by the queue when there is no data left. Users should not find themselves directly accessing these except for construction unless a custom Wait is being written.
Examples
use multiqueue::wait::*; use multiqueue::multiqueue_with; let _ = multiqueue_with::<usize, BusyWait>(10, BusyWait::new()); let _ = multiqueue_with::<usize, YieldingWait>(10, YieldingWait::new()); let _ = multiqueue_with::<usize, BlockingWait>(10, BlockingWait::new());
Structs
BlockingWait |
This tries spinning on the queue for a short while, then yielding, and then blocks |
BusyWait |
Thus spins in a loop on the queue waiting for a value to be ready |
YieldingWait |
This spins on the queue for a few iterations and then starts yielding intermittently |
Constants
DEFAULT_TRY_SPINS | |
DEFAULT_YIELD_SPINS |
Traits
Wait |
This is the trait that something implements to allow receivers to block waiting for more data. |
Functions
check | |
load_tagless |