Expand description
§Synchronization Channels
This crate contains asynchronous channels to communicate between tasks or threads.
Structs§
- Receiver
- Receive end of a circular buffer channel. If the send end is dropped, the receive end will receive all data remaining in the buffer and will then terminate.
- Recv
- The future type returned by the
Receiver::recvmethod. - Sender
- Send end of a circular buffer channel. If the receive end is dropped it the sender will reject any additional attempts to send values.
Functions§
- channel
- A single producer, single consumer circular buffer channel. The receiver will receiver all records
pushed into the channel until the buffer fills, after which point records will be dropped in
order of age. The representation of the buffer varies with its capacity. For a capacity of 1
the buffer is a single value, guarded by a lock. For ‘small’ buffers (up to
LARGE_BOUNDARYentries) the representation is a fixed size, pre-allocated array. For larger buffers the representation will grow, as required, as entries are pushed into it. - watch_
channel - Create a circular buffer channel with a single entry.