pub fn ring_buffer<T>(capacity: usize) -> (Producer<T>, Consumer<T>)Expand description
Creates a new SPSC ring buffer with the given capacity.
Returns a (Producer, Consumer) pair.
The actual capacity will be rounded up to the next power of two.
ยงPanics
Panics if capacity is 0.