Expand description
This module provides implementations of single-producer single-consumer queues.
It contains two implementations:
- [
const_bounded]: A const bounded ring buffer. Usenew_boundedornew_cache_padded_boundedorSPSCBoundedQueue. - [
unbounded]: An unbounded ring buffer. Use one of thenew_unbounded,new_cache_padded_unbounded,new_unbounded_with_sync_cellandnew_cache_padded_unbounded_with_sync_cell.
Structs§
- Cache
PaddedSPSC Consumer - The consumer of the
SPSCBoundedQueue. - Cache
PaddedSPSC Producer - The producer of the
SPSCBoundedQueue. - Cache
PaddedSPSC Unbounded Consumer - The consumer of the [
SPSCUnboundedQueue]. - Cache
PaddedSPSC Unbounded Producer - The producer of the [
SPSCUnboundedQueue]. - SPSC
Bounded Queue - The single-producer, single-consumer ring-based const bounded queue.
- SPSC
Consumer - The consumer of the
SPSCBoundedQueue. - SPSC
Producer - The producer of the
SPSCBoundedQueue. - SPSC
Unbounded Consumer - The consumer of the [
SPSCUnboundedQueue]. - SPSC
Unbounded Producer - The producer of the [
SPSCUnboundedQueue].
Functions§
- new_
bounded - Creates a new single-producer, single-consumer queue with the given capacity.
Returns
producerandconsumer. - new_
cache_ padded_ bounded - Creates a new single-producer, single-consumer queue with the given capacity.
Returns
producerandconsumer. - new_
cache_ padded_ unbounded - Calls
new_cache_padded_unbounded_with_sync_cellwithNaiveRWLock. - new_
cache_ padded_ unbounded_ with_ sync_ cell - Creates a new single-producer, single-consumer unbounded queue.
Returns
producerandconsumer. - new_
unbounded - Calls
new_unbounded_with_sync_cellwithNaiveRWLock. - new_
unbounded_ with_ sync_ cell - Creates a new single-producer, single-consumer unbounded queue.
Returns
producerandconsumer.