Module multiqueue::wait [−][src]
Expand description
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::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
This tries spinning on the queue for a short while, then yielding, and then blocks
Thus spins in a loop on the queue waiting for a value to be ready
This spins on the queue for a few iterations and then starts yielding intermittently
Constants
Traits
This is the trait that something implements to allow receivers to block waiting for more data.
