#priority-queue #queue #sequential #priority #message-queue #heap

ordered-channel

A channel that always receives messages in the correct order, even if they were sent out of order

2 stable releases

1.1.0 Jan 24, 2024
1.0.0 Jan 23, 2024

#527 in Concurrency

Download history 1071/week @ 2024-07-22 1018/week @ 2024-07-29 766/week @ 2024-08-05 732/week @ 2024-08-12 908/week @ 2024-08-19 882/week @ 2024-08-26 975/week @ 2024-09-02 594/week @ 2024-09-09 600/week @ 2024-09-16 792/week @ 2024-09-23 762/week @ 2024-09-30 727/week @ 2024-10-07 624/week @ 2024-10-14 629/week @ 2024-10-21 737/week @ 2024-10-28 704/week @ 2024-11-04

2,820 downloads per month
Used in 12 crates (2 directly)

MIT/Apache

10KB
184 lines

Ordered channel

An MPSC blocking channel that returns messages in sorted sequential consecutive order (explicitly assigned to each message), regardless of the order they were sent in.

It's convenient for collecting order-sensitive results of parallel operations (fork-join iteration).

It's backed by a BinaryHeap that's used only when necessary to reorder the messages.

Dependencies

~76KB