Function tarantool::fiber::async::oneshot::channel

source ·
pub fn channel<T>() -> (Sender<T>, Receiver<T>)
Expand description

Creates a new one-shot channel for sending single values across asynchronous tasks.

The function returns separate “send” and “receive” handles. The Sender handle is used by the producer to send the value. The Receiver handle is used by the consumer to receive the value.

Each handle can be used on separate fibers.

See super::oneshot for examples.