[][src]Function multiqueue2::mpmc_queue

pub fn mpmc_queue<T>(capacity: u32) -> (MPMCSender<T>, MPMCReceiver<T>)

Creates a (MPMCSender, MPMCReceiver) pair with a capacity that's the next power of two >= the given capacity

Example

use multiqueue2::mpmc_queue;
let (w, r) = mpmc_queue(10);
w.try_send(10).unwrap();
assert_eq!(10, r.try_recv().unwrap());