Skip to main content

spsc_pair

Function spsc_pair 

Source
pub fn spsc_pair<T, const CAP: usize>() -> (SpscProducer<T, CAP>, SpscConsumer<T, CAP>)
Expand description

Create a connected lock-free Single-Producer Single-Consumer (SPSC) ring buffer pair.

ยงPanics

Panics if CAP is not greater than zero or is not a power of two.