pub fn channel<T>(capacity: usize) -> (Sender<T>, Receiver<T>)
Expand description
Creates a new asynchronous channel, returning the sender/receiver halves.
All data sent on the Sender will become available on the Receiver in the same order as it was sent,
and no send
will block the calling fiber, recv
will block until a message is available.