Function new
pub fn new(capacity: usize) -> (Sender, Receiver)
Create a simplex channel.
The capacity parameter specifies the maximum number of bytes that can be
stored in the channel without making the Sender::poll_write
return Poll::Pending.
Panics
This function will panic if capacity is zero.