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§
- Error returned by
send_now
. - Error returned by
try_next
. - Error returned by
UnboundedSender
when used as aSink
. - The receiver of an unbounded mpsc channel.
- The sender of an unbounded mpsc channel.
Functions§
- Creates an unbounded channel.