Skip to main content

Crate ordered_channel

Crate ordered_channel 

Source
Expand description

Equivalent of mpsc or crossbeam-channel, but allows sending messages with an index associated with them, to be delivered in the specific indexed order.

This enables performing multi-threaded work without accidentally reordering results.

Results are delivered as soon as possible, with minimal buffering. Items received out of order are temporarily kept in a binary heap.

Structsยง

OrderByKey ๐Ÿ”’
Receiver
Receiver that orders messages by an index
RecvError
Error type
SendError
Error type
Sender
A channel sender that orders messages by an index

Enumsยง

SenderKind ๐Ÿ”’
TryRecvError
Error type
TrySendError
Error type

Functionsยง

bounded
Make a blocking channel with finite size
make ๐Ÿ”’
unbounded
Make a channel that can grow until the program runs out of memory