Skip to content

SpscRing

Source: SpscRing.h

SpscRing

template<typename T, uint32_t N>
class SpscRing
src/core/util/SpscRing.h:34

Public Methods

inline size_t push(const T * src, size_t count) : The producer side, returning how many elements were accepted, fewer than asked when the ring is near full.

inline size_t pop(T * dst, size_t max) : The consumer side, returning how many elements were read.

inline size_t size() const : How many elements are queued as the consumer sees it, approximate under concurrency and exact when one side is idle.