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

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

#160 in Concurrency

Download history 208/week @ 2024-01-22 134/week @ 2024-01-29 343/week @ 2024-02-05 264/week @ 2024-02-12 297/week @ 2024-02-19 318/week @ 2024-02-26 287/week @ 2024-03-04 341/week @ 2024-03-11 254/week @ 2024-03-18 273/week @ 2024-03-25 966/week @ 2024-04-01 932/week @ 2024-04-08 836/week @ 2024-04-15 834/week @ 2024-04-22 787/week @ 2024-04-29 566/week @ 2024-05-06

3,171 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