Skip to main content

Module mpsc

Module mpsc 

Source
Expand description

Bounded multi-producer, single-consumer channel.

Create a channel with bounded. The BoundedSender can be cloned for multiple producers; there is exactly one Receiver. Sending blocks when the channel is full, providing natural backpressure.

Structs§

BoundedSender
Sending half of a bounded channel. Cloneable for multiple producers.
Receiver
Receiving half of a bounded channel.
RecvError
Error returned by Receiver::recv when all senders have been dropped.
SendError
Error returned by BoundedSender::send when the receiver has been dropped.

Enums§

TryRecvError
Error returned by Receiver::try_recv.
TrySendError
Error returned by BoundedSender::try_send.

Functions§

bounded
Creates a bounded channel with the given capacity.