pub fn bounded<T>(cap: usize) -> (Sender<T>, Receiver<T>)
Expand description
Create a multi-producer multi-consumer channel with bounded capacity.
The messages are allocated at channel creation time. If there are no messages at send
time,
send will block (possibly waiting for a timeout).
At this time, Zephyr does not support crossbeam’s 0 capacity queues, which are also called
a rendezvous, where both threads wait until in the same region. bounded
will panic if called
with a capacity of zero.