CAF 0.17.6
|
A work queue that internally multiplexes any number of DRR queues. More...
#include <wdrr_dynamic_multiplexed_queue.hpp>
Public Types | |
using | policy_type = Policy |
using | deficit_type = typename policy_type::deficit_type |
using | mapped_type = typename policy_type::mapped_type |
using | key_type = typename policy_type::key_type |
using | pointer = mapped_type * |
using | unique_pointer = typename policy_type::unique_pointer |
using | task_size_type = typename policy_type::task_size_type |
using | queue_map_type = typename policy_type::queue_map_type |
using | queue_type = typename queue_map_type::mapped_type |
Public Member Functions | |
template<class... Ps> | |
wdrr_dynamic_multiplexed_queue (policy_type p) | |
policy_type & | policy () noexcept |
const policy_type & | policy () const noexcept |
bool | push_back (mapped_type *ptr) noexcept |
bool | push_back (unique_pointer ptr) noexcept |
template<class... Ts> | |
bool | emplace_back (Ts &&... xs) |
void | inc_deficit (deficit_type x) noexcept |
template<class F > | |
new_round_result | new_round (deficit_type quantum, F &f) |
Run a new round with quantum , dispatching all tasks to consumer . | |
void | cleanup () |
Erases all keys previously marked via erase_later . | |
void | erase_later (key_type k) |
Marks the key k for erasing from the map later. | |
pointer | peek () noexcept |
template<class F > | |
void | peek_all (F f) const |
Applies f to each element in the queue. | |
bool | empty () const noexcept |
Returns true if all queues are empty, false otherwise. | |
void | flush_cache () noexcept |
task_size_type | total_task_size () const noexcept |
queue_map_type & | queues () noexcept |
Returns the tuple containing all nested queues. | |
const queue_map_type & | queues () const noexcept |
Returns the tuple containing all nested queues. | |
void | lifo_append (pointer ptr) noexcept |
void | stop_lifo_append () noexcept |
A work queue that internally multiplexes any number of DRR queues.
new_round_result caf::intrusive::wdrr_dynamic_multiplexed_queue< Policy >::new_round | ( | deficit_type | quantum, |
F & | f | ||
) |
Run a new round with quantum
, dispatching all tasks to consumer
.
true
if at least one item was consumed, false
otherwise.