Function new
pub fn new(capacity: usize) -> (Sender, Receiver)Available on crate feature
std only.Expand description
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.