Function batch_channel::bounded

source ·
pub fn bounded<T>(capacity: usize) -> (BoundedSender<T>, Receiver<T>)
Expand description

Allocates a new, bounded channel and returns the sender, receiver pair.

Rust async is polling, so synchronous channels are not supported. Therefore, a capacity of 0 is rounded up to 1.