zephyr::sync::channel

Function unbounded

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

Create a multi-producer multi-consumer channel of unbounded capacity.

The messages are allocated individually as “Box”. The underlying Zephyr queue will be dynamically allocated.

Note: Currently Drop is not propertly supported on Zephyr. If all senders are dropped, any receivers will likely be blocked forever. Any data that has been queued and not received will be leaked when all receivers have been droped.