Skip to main content

bounded

Function bounded 

Source
pub fn bounded<T>(capacity: usize) -> (Producer<T>, Consumer<T>)
Expand description

Creates a bounded MPSC queue with the given capacity.

Capacity is rounded up to the next power of two.

ยงPanics

Panics if capacity is zero.