Module channel::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

  • The receiving end of the diem_channel.
  • The sending end of the diem_channel.

Enums

  • 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

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