Module mpsc
Expand description
A multi-producer, single-receiver channel.
This is an asynchronous, !Send version of std::sync::mpsc. Currently only the unbounded
variant is implemented.
UnboundedReceiver implements [Stream] and allows asynchronous tasks to read values out of
the channel. The UnboundedReceiver Stream will suspend and wait for available values if the
current queue is empty. UnboundedSender implements [Sink] and allows messages to be sent
to the corresponding UnboundedReceiver. The UnboundedReceiver also implements a
send_now method to send a value synchronously.
Structs§
- Send
Error - Error returned by
send_now. - TryRecv
Error - Error returned by
try_next. - TrySend
Error - Error returned by
UnboundedSenderwhen used as aSink. - Unbounded
Receiver - The receiver of an unbounded mpsc channel.
- Unbounded
Sender - The sender of an unbounded mpsc channel.
Functions§
- unbounded
- Creates an unbounded channel.