[−][src]Module multiqueue2::wait
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 multiqueue2::wait::*; use multiqueue2::broadcast_queue_with; let _ = broadcast_queue_with::<usize, BusyWait>(10, BusyWait::new()); let _ = broadcast_queue_with::<usize, YieldingWait>(10, YieldingWait::new()); let _ = broadcast_queue_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_CHECK_DELAY | |
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 |