Skip to main content

Module mpsc

Module mpsc 

Source
Expand description

Multi-producer single-consumer (MPSC) channel.

Provides both bounded and unbounded variants. Senders are Clone; the Receiver is unique. Dropping all Senders closes the channel so recv returns None.

Structs§

Receiver
Receiving half of either channel variant. Not Clone.
RecvFuture
Future returned by Receiver::recv.
SendFuture
Future returned by Sender::send.
Sender
Sending half of a bounded MPSC channel.
UnboundedSender
Sending half of an unbounded MPSC channel.

Functions§

channel
Create a bounded MPSC channel with the given capacity.
unbounded
Create an unbounded MPSC channel.