#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

#207 in Concurrency

Download history 228/week @ 2024-01-23 129/week @ 2024-01-30 373/week @ 2024-02-06 266/week @ 2024-02-13 292/week @ 2024-02-20 346/week @ 2024-02-27 261/week @ 2024-03-05 346/week @ 2024-03-12 249/week @ 2024-03-19 473/week @ 2024-03-26 810/week @ 2024-04-02 1032/week @ 2024-04-09 738/week @ 2024-04-16

3,097 downloads per month
Used in 6 crates (via gifski)

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