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