Module diem_channel

Source
Expand description

diem_channel provides an mpsc channel which has two ends diem_channel::Receiver and diem_channel::Sender similar to existing mpsc data structures. What makes it different from existing mpsc channels is that we have full control over how the internal queueing in the channel happens and how we schedule messages to be sent out from this channel. Internally, it uses the PerKeyQueue to store messages

Structs§

Receiver
The receiving end of the diem_channel.
Sender
The sending end of the diem_channel.

Enums§

ElementStatus
The status of an element inserted into a diem_channel. If the element is successfully dequeued, ElementStatus::Dequeued is sent to the sender. If it is dropped ElementStatus::Dropped is sent to the sender along with the dropped element.

Functions§

new
Create a new Diem Channel and returns the two ends of the channel.