Consumer class
Constructors, destructors, conversion operators
Public functions
- auto operator=(const Consumer&) -> Consumer& deleted
- auto Size() const -> size_t
- Number of items currently available to read.
- auto IsEmpty() const -> bool
- auto TryPeekAt(size_t offset, T& out) const -> bool
- auto TryPop(T& out) -> bool
- Non-blocking dequeue. Returns false if empty.
- void DropFront(size_t n)
- Discard the oldest n items. Stops early if the queue empties.
Function documentation
bool TrinyxMPSCRing:: Consumer:: TryPeekAt(size_t offset,
T& out) const
Peek at (DequeuePos + offset) without consuming. Returns false if offset is out of range or the slot isn't committed yet.