Function channel

Source
pub fn channel<T>(cap: usize) -> (Sender<T>, Receiver<T>)
Expand description

Creates a new bounded channel. When cap is 0 it will be increased to 1.