pub fn channel<T>() -> (Sender<T>, Receiver<T>)
Create a new oneshot broadcast channel.
let (tx, rx) = channel(); let rx_clone = rx.clone(); tx.send(0_u8); assert_eq!(rx.await, Ok(0)); assert_eq!(rx_clone.await, Ok(0));