pub fn bounded<T>(capacity: usize) -> (Sender<T>, Receiver<T>)Expand description
Allocates a bounded channel and returns the sender, receiver pair.
Rust async is polling, so unbuffered channels are not supported. Therefore, a capacity of 0 is rounded up to 1.