|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Backpressure mechanisms for controlling queue overflow and rate limiting. More...
Classes | |
| struct | kcenon::thread::backpressure_config |
| Configuration for backpressure mechanisms. More... | |
| struct | kcenon::thread::backpressure_stats_snapshot |
| Snapshot of backpressure statistics (copyable). More... | |
| struct | kcenon::thread::backpressure_stats |
| Thread-safe statistics for backpressure operations. More... | |
| class | kcenon::thread::backpressure_job_queue |
| A job queue with comprehensive backpressure mechanisms. More... | |
| class | kcenon::thread::token_bucket |
| Lock-free token bucket rate limiter for controlling throughput. More... | |
Enumerations | |
| enum class | kcenon::thread::backpressure_policy { kcenon::thread::backpressure_policy::block , kcenon::thread::backpressure_policy::drop_oldest , kcenon::thread::backpressure_policy::drop_newest , kcenon::thread::backpressure_policy::callback , kcenon::thread::backpressure_policy::adaptive } |
| Policy for handling queue overflow conditions. More... | |
| enum class | kcenon::thread::backpressure_decision { kcenon::thread::backpressure_decision::accept , kcenon::thread::backpressure_decision::reject , kcenon::thread::backpressure_decision::drop_and_accept , kcenon::thread::backpressure_decision::delay } |
| Decision returned by callback policy handler. More... | |
| enum class | kcenon::thread::pressure_level { kcenon::thread::pressure_level::none , kcenon::thread::pressure_level::low , kcenon::thread::pressure_level::high , kcenon::thread::pressure_level::critical } |
| Current pressure level for graduated response. More... | |
Backpressure mechanisms for controlling queue overflow and rate limiting.
|
strong |
Decision returned by callback policy handler.
When using backpressure_policy::callback, the user-provided callback function returns one of these decisions to determine how to handle the incoming job.
| Enumerator | |
|---|---|
| accept | Accept the job into the queue. |
| reject | Reject with error (queue_full) |
| drop_and_accept | Drop the oldest job, then accept new one. |
| delay | Delay processing (attempt later) |
Definition at line 68 of file backpressure_config.h.
|
strong |
Policy for handling queue overflow conditions.
Defines how the queue should respond when it reaches capacity or encounters pressure situations.
Definition at line 49 of file backpressure_config.h.
|
strong |
Current pressure level for graduated response.
Indicates the current load level of the queue based on watermark thresholds. Used by adaptive policies and for monitoring.
| Enumerator | |
|---|---|
| none | Below low_watermark, queue is healthy. |
| low | Between low and high watermark. |
| high | Above high_watermark, approaching capacity. |
| critical | At or above max_size, queue is full. |
Definition at line 85 of file backpressure_config.h.