Function futures_intrusive::channel::shared::generic_channel
source · pub fn generic_channel<MutexType, T, A>(
capacity: usize
) -> (GenericSender<MutexType, T, A>, GenericReceiver<MutexType, T, A>)where
MutexType: RawMutex,
A: RingBuf<Item = T>,
T: Send,
Expand description
Creates a new Channel which can be used to exchange values of type T
between
concurrent tasks. The ends of the Channel are represented through
the returned Sender and Receiver.
Both the Sender and Receiver can be cloned in order to let more tasks
interact with the Channel.
As soon es either all Senders or all Receivers are closed, the Channel itself will be closed.
The channel can buffer up to capacity
items internally.