Module calloop::channel

source ·
Expand description

An MPSC channel whose receiving end is an event source

Create a channel using Channel::<T>::new(), which returns a Sender<T> that can be cloned and sent accross threads if T: Send, and a Channel<T> that can be inserted into an EventLoop. It will generate one event per message.

This implementation is based on mio_more::channel.

Structs

The receiving end of the channel
The sending half of a channel.
The sending half of a synchronous channel.

Enums

The events generated by the channel event source
An error returned from the Sender::send or SyncSender::send function.
An error returned from the SyncSender::try_send function.

Functions

Create a new asynchronous channel
Create a new synchronous, bounded channel