pub fn ring_buffer<T>(capacity: usize) -> (Producer<T>, Consumer<T>)
Creates a bounded SPSC ring buffer with the given capacity.
Capacity is rounded up to the next power of two.
Panics if capacity is zero.
capacity