|
Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
|
Queue Policy for fixed-capacity, zero-allocation lock-free MPSC RingBuffer. More...
#include <QueuePolicies.hpp>
Inheritance diagram for corium::BoundedMpscQueuePolicy< EventVariant, Capacity >:
Collaboration diagram for corium::BoundedMpscQueuePolicy< EventVariant, Capacity >:Classes | |
| struct | PushResult |
Public Types | |
| using | EventType = EventVariant |
Public Member Functions | |
| bool | empty () const noexcept |
| Check if queue is empty. | |
| bool | tryPop (EventVariant &event) |
| Try to pop an event from the lock-free queue (single consumer). | |
| PushResult | tryPush (const EventVariant &event, EventPriority priority=EventPriority::Normal) |
| Try to push an event into the lock-free queue (const lvalue overload). | |
| PushResult | tryPush (EventVariant &&event, EventPriority priority=EventPriority::Normal) |
| Try to push an event into the lock-free queue (thread-safe, zero allocations). | |
Static Public Attributes | |
| static constexpr std::size_t | capacity = Capacity |
| Accessible queue capacity for profiler wiring. | |
Queue Policy for fixed-capacity, zero-allocation lock-free MPSC RingBuffer.
| EventVariant | The variant type list of supported events. |
| Capacity | Ring buffer capacity (must be a power of 2). |
| using corium::BoundedMpscQueuePolicy< EventVariant, Capacity >::EventType = EventVariant |
|
inlinenoexcept |
Check if queue is empty.
|
inline |
Try to pop an event from the lock-free queue (single consumer).
|
inline |
Try to push an event into the lock-free queue (const lvalue overload).
Here is the call graph for this function:
|
inline |
Try to push an event into the lock-free queue (thread-safe, zero allocations).
Here is the caller graph for this function:
|
staticconstexpr |
Accessible queue capacity for profiler wiring.