ring_buffer

Function ring_buffer 

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

Creates a bounded SPSC ring buffer with the given capacity.

Capacity is rounded up to the next power of two.

ยงPanics

Panics if capacity is zero.