|
Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
|
Queue Policy supporting strict event priorities using separate lock-free MPSC ring buffers. High priority events are always popped and dispatched before Normal/Low priority events. More...
#include <QueuePolicies.hpp>
Collaboration diagram for corium::PriorityMpscQueuePolicy< EventVariant, HighCapacity, NormalCapacity, LowCapacity >:Classes | |
| struct | PushResult |
Public Types | |
| using | EventType = EventVariant |
Public Member Functions | |
| bool | empty () const noexcept |
| Check if all priority queues are empty. | |
| bool | tryPop (EventVariant &event) |
| Try to pop an event from the priority queue (strict priority order: High -> Normal -> Low). | |
| PushResult | tryPush (const EventVariant &event, EventPriority priority=EventPriority::Normal) |
| Try to push an event into the priority queue (const lvalue overload). | |
| PushResult | tryPush (EventVariant &&event, EventPriority priority=EventPriority::Normal) |
| Try to push an event into the priority queue (thread-safe, zero dynamic allocation). | |
Static Public Attributes | |
| static constexpr std::size_t | capacity = HighCapacity + NormalCapacity + (LowCapacity > 0 ? LowCapacity : 0) |
| Total accessible capacity (high + normal; low is optional). | |
Queue Policy supporting strict event priorities using separate lock-free MPSC ring buffers. High priority events are always popped and dispatched before Normal/Low priority events.
| EventVariant | The variant type list of supported events. |
| HighCapacity | Capacity for high-priority ring buffer (power of 2). |
| NormalCapacity | Capacity for normal-priority ring buffer (power of 2). |
| LowCapacity | Capacity for low-priority ring buffer (power of 2, 0 to disable). |
| using corium::PriorityMpscQueuePolicy< EventVariant, HighCapacity, NormalCapacity, LowCapacity >::EventType = EventVariant |
|
inlinenoexcept |
Check if all priority queues are empty.
Here is the caller graph for this function:
|
inline |
Try to pop an event from the priority queue (strict priority order: High -> Normal -> Low).
|
inline |
Try to push an event into the priority queue (const lvalue overload).
Here is the call graph for this function:
|
inline |
Try to push an event into the priority queue (thread-safe, zero dynamic allocation).
Here is the call graph for this function:
Here is the caller graph for this function:
|
staticconstexpr |
Total accessible capacity (high + normal; low is optional).