Function std::sync::mpmc::sync_channel
source · pub fn sync_channel<T>(cap: usize) -> (Sender<T>, Receiver<T>)
Expand description
Creates a channel of bounded capacity.
This channel has a buffer that can hold at most cap
messages at a time.
A special case is zero-capacity channel, which cannot hold any messages. Instead, send and receive operations must appear at the same time in order to pair up and pass the message over.