#channel #queue #sender #key #receiver #fifo #blockchain

yanked aptos-channel

An implementation of a channel with configurable QoS

0.2.7 Aug 16, 2022
0.2.6 Aug 13, 2022
0.2.2 Jul 22, 2022
0.1.7 Jul 9, 2022
0.1.0 May 27, 2022

#35 in #receiver


Used in 36 crates (14 directly)

Apache-2.0

58KB
1.5K SLoC

Provides an mpsc (multi-producer single-consumer) channel wrapped in an IntGauge that counts the number of currently queued items. While there is only one Receiver, there can be many Senders, which are also cheap to clone.

This channel differs from our other channel implementation, aptos_channel, in that it is just a single queue (vs. different queues for different keys) with backpressure (senders will block if the queue is full instead of evicting another item in the queue) that only implements FIFO (vs. LIFO or KLAST).

Dependencies

~1.8–7MB
~56K SLoC