Crate relay [−] [src]
relay
A light-weight channel using Future
. A relay channel does not implement
Send
, and so is not meant for synchronizing between threads. Instead,
its used to send message between tasks that live in the same thread.
It is similar to the oneshot
channel in the futures
crate, but since
it is not meant for sending across threads, it performs about twice as
fast.
Example
let (tx, rx) = relay::channel(); tx.complete("foo"); assert_eq!(rx.wait().unwrap(), "foo");
Structs
Canceled |
Represents that the |
Receiver |
The receiver end of the channel. |
Sender |
The Sender portion of a channel. |
Waiting |
A |
Functions
channel |
Create a new channel to send a message. |