|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Policy that drops the oldest item when queue is full. More...
#include <overflow_policies.h>

Public Types | |
| using | policy_tag = overflow_policy_tag |
Public Member Functions | |
| auto | handle_overflow (std::unique_ptr< job > &&value) -> std::pair< bool, std::unique_ptr< job > > |
| Handle overflow by requesting oldest item removal. | |
Static Public Member Functions | |
| static constexpr auto | blocks () noexcept -> bool |
| Check if this policy blocks on overflow. | |
| static constexpr auto | drops_oldest () noexcept -> bool |
| Check if this policy drops items on overflow. | |
| static constexpr auto | name () noexcept -> const char * |
| Get a descriptive name for this policy. | |
Policy that drops the oldest item when queue is full.
When the queue is full, the oldest item (front of queue) is removed and discarded, making room for the new item.
Definition at line 151 of file overflow_policies.h.
Definition at line 153 of file overflow_policies.h.
|
inlinestaticnodiscardconstexprnoexcept |
Check if this policy blocks on overflow.
Definition at line 170 of file overflow_policies.h.
|
inlinestaticnodiscardconstexprnoexcept |
Check if this policy drops items on overflow.
Definition at line 178 of file overflow_policies.h.
|
inlinenodiscard |
Handle overflow by requesting oldest item removal.
| value | The job to be added |
Definition at line 160 of file overflow_policies.h.
|
inlinestaticnodiscardconstexprnoexcept |
Get a descriptive name for this policy.
Definition at line 186 of file overflow_policies.h.