Function channel
Source pub fn channel<T: Send + Sync>(
capacity: NonZeroUsize,
) -> (Sender<T>, Receiver<T>)
Expand description
Creates a new ring channel with the specified capacity.
Returns a (Sender, Receiver) pair. The sender can be cloned to create
multiple producers.