[−][src]Function executors::bichannel::bichannel
pub fn bichannel<Left, Right>(
) -> (Endpoint<Right, Left>, Endpoint<Left, Right>)
Creates a new asynchronous bidirectional channel, returning the the two asymmetrical Endpoints. All data sent on an Endpoint will become available on the other Endpoint in the same order as it was sent, and no send will block the calling thread (this channel has an "infinite buffer") The recv will block until a message is available.
Neither Endpoint maye be cloned, but both may be send to different threads.
If either Endpoint is disconnected while trying to send, the send/recv methods will return a SendError/RecvError.