Expand description
§One shot SPSC channels
Very simple single-use channels with a sync and async API, blocking/non-blocking.
This builds on Slot<T>
, so the item has to be boxed.
Most useful for the transfer of return values in the context of remote procedure calling, as “reply pipes”.
let (tx, rx) = async_fifo::oneshot();
let item = 72u8;
tx.send(Box::new(item));
assert_eq!(*rx.await, item);
Structs§
Functions§
- new
- Create a new oneshot channel, returning a sender/receiver pair