Function multiqueue::mpmc_queue [−][src]
pub fn mpmc_queue<T>(capacity: u64) -> (MPMCSender<T>, MPMCReceiver<T>)Expand description
Creates a (MPMCSender, MPMCReceiver) pair with a capacity that’s
the next power of two >= the given capacity
Example
use multiqueue::mpmc_queue;
let (w, r) = mpmc_queue(10);
w.try_send(10).unwrap();
assert_eq!(10, r.try_recv().unwrap());