template<typename T>
TrinyxSPMCRing class
TrinyxSPMCRing<T> — Bounded SPMC lock-free queue (Vyukov sequence-number pattern).
- Exactly one producer calls TryPush (plain store on EnqueuePos — no CAS).
- Multiple consumers call TryPop concurrently (atomic DequeuePos + CAS).
Typical use: one coordinator thread fans work out to a pool of workers — e.g. Encoder thread producing render upload jobs that any worker can drain.
See TrinyxRingBase for the full queue family overview.
Base classes
-
template<typename Derived, typename T>class TrinyxRingBase<TrinyxSPMCRing<T>, T>
Constructors, destructors, conversion operators
- TrinyxSPMCRing() defaulted
- ~TrinyxSPMCRing()
- TrinyxSPMCRing(const TrinyxSPMCRing&) deleted
Public functions
- auto operator=(const TrinyxSPMCRing&) -> TrinyxSPMCRing& deleted
- auto Initialize(size_t requestedCapacity) -> bool
- void Shutdown()
- auto TryPush(const T& item) -> bool
- auto TryPush(T&& item) -> bool
- auto TryPop(T& item) -> bool
- Non-blocking dequeue. Returns false if empty.
- auto IsEmpty() const -> bool