futures_intrusive::channel::shared

Function generic_oneshot_channel

Source
pub fn generic_oneshot_channel<MutexType, T>() -> (GenericOneshotSender<MutexType, T>, GenericOneshotReceiver<MutexType, T>)
where MutexType: RawMutex, T: Send,
Expand description

Creates a new oneshot 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.

As soon es either the senders or receivers is closed, the channel itself will be closed.