mpsc library

Classes

DisconnectedError
An error returned from the recv function on a Receiver when the Sender called close.
OtherError
An error returned from the recv function on a Receiver when the Sender called addError.
Reciever<T>
The recieving-half of channel. Recievers do not close if the Sender sends an error.
RecvError
An error returned from the recv function on a Receiver.
RecvTimeoutError
An error returned from the recvTimeout function on a Receiver.
TimeoutError
An error returned from the recvTimeout function on a Receiver when the time limit is reached before the Sender sends any data.

Extensions

SenderExtension on Sender<T>

Functions

channel<T>() → (Sender<T>, Reciever<T>)
Creates a new mpsc channel, returning the Sender and Reciever. Each item T sent by the Sender will only be seen once by the Reciever. If the Sender calls close while the Recievers buffer is not empty, the Reciever will yield the remaining items in the buffer until empty.

Typedefs

Sender<T> = StreamSink<T>
The sending-half of channel.