pub fn unbounded_channel<T>() -> (UnboundedSender<T>, UnboundedReceiver<T>)Expand description
Creates an unbounded channel and answers its two halves.
The halves belong to the tasks of one shard: they are !Send.
use nuclei::sync::local::mpsc;
let (tx, mut rx) = mpsc::unbounded_channel();
tx.send(1).unwrap();
tx.send(2).unwrap();
assert_eq!(rx.try_recv(), Ok(1));
assert_eq!(rx.try_recv(), Ok(2));