|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Configuration for priority aging behavior. More...
#include <priority_aging_config.h>

Public Attributes | |
| bool | enabled = false |
| Whether priority aging is enabled. | |
| std::chrono::milliseconds | aging_interval {1000} |
| Interval at which aging is applied. | |
| int | priority_boost_per_interval = 1 |
| Amount of priority boost applied per aging interval. | |
| int | max_priority_boost = 3 |
| Maximum total priority boost that can be applied. | |
| aging_curve | curve = aging_curve::linear |
| The aging curve algorithm to use. | |
| double | exponential_factor = 1.5 |
| Exponential factor for exponential aging curve. | |
| std::chrono::seconds | starvation_threshold {30} |
| Threshold for starvation detection. | |
| std::function< void(const job_info &)> | starvation_callback |
| Callback function invoked when a job is starving. | |
| bool | reset_on_dequeue = true |
| Whether to reset the boost when a job is dequeued. | |
Configuration for priority aging behavior.
This structure contains all the parameters needed to configure priority aging in a typed thread pool. Priority aging prevents starvation of low-priority jobs by automatically boosting their priority based on wait time.
Definition at line 79 of file priority_aging_config.h.
| std::chrono::milliseconds kcenon::thread::priority_aging_config::aging_interval {1000} |
Interval at which aging is applied.
Jobs waiting longer than this interval will receive a priority boost.
Definition at line 93 of file priority_aging_config.h.
Referenced by kcenon::thread::config_builder::with_priority_aging_params().
| aging_curve kcenon::thread::priority_aging_config::curve = aging_curve::linear |
The aging curve algorithm to use.
Definition at line 116 of file priority_aging_config.h.
| bool kcenon::thread::priority_aging_config::enabled = false |
Whether priority aging is enabled.
When disabled, no priority boosting occurs.
Definition at line 86 of file priority_aging_config.h.
Referenced by kcenon::thread::config_builder::enable_priority_aging().
| double kcenon::thread::priority_aging_config::exponential_factor = 1.5 |
Exponential factor for exponential aging curve.
Only used when curve is set to exponential.
Definition at line 123 of file priority_aging_config.h.
| int kcenon::thread::priority_aging_config::max_priority_boost = 3 |
Maximum total priority boost that can be applied.
Prevents low-priority jobs from exceeding a certain priority level.
Definition at line 107 of file priority_aging_config.h.
Referenced by kcenon::thread::config_builder::with_priority_aging_params().
| int kcenon::thread::priority_aging_config::priority_boost_per_interval = 1 |
Amount of priority boost applied per aging interval.
Higher values result in faster priority escalation.
Definition at line 100 of file priority_aging_config.h.
Referenced by kcenon::thread::config_builder::with_priority_aging_params().
| bool kcenon::thread::priority_aging_config::reset_on_dequeue = true |
Whether to reset the boost when a job is dequeued.
When true, the priority boost is reset after the job is dequeued.
Definition at line 145 of file priority_aging_config.h.
| std::function<void(const job_info&)> kcenon::thread::priority_aging_config::starvation_callback |
Callback function invoked when a job is starving.
This callback is called when a job has been waiting longer than the starvation_threshold. Can be used for alerting or monitoring.
Definition at line 138 of file priority_aging_config.h.
| std::chrono::seconds kcenon::thread::priority_aging_config::starvation_threshold {30} |
Threshold for starvation detection.
If a job waits longer than this threshold, it is considered starving.
Definition at line 130 of file priority_aging_config.h.