Expand description
§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§
- Represents that the
Sender
dropped before sending a message. - The receiver end of the channel.
- The Sender portion of a channel.
- A
Future
waiting for interest to be registered on theReceiver
.
Functions§
- Create a new channel to send a message.