|
C++ Concurrency Sandbox
|
Represents a task whose priority can increase over time. More...
Public Member Functions | |
| bool | operator< (const AgedTask &other) const |
| Heap comparator. Higher current_priority values are moved to the front of the heap. | |
Public Attributes | |
| int | original_priority |
| The priority assigned at submission. | |
| int | current_priority |
| The boosted priority after aging. | |
| system_clock::time_point | arrival_time |
| Timestamp of when the task entered the pool. | |
| std::function< void()> | func |
| The callable task logic. | |
| std::string | task_name |
| Human-readable name for logging. | |
Represents a task whose priority can increase over time.
Definition at line 27 of file AgingPriority.cpp.
|
inline |
Heap comparator. Higher current_priority values are moved to the front of the heap.
Definition at line 38 of file AgingPriority.cpp.
References current_priority.
| system_clock::time_point AgedTask::arrival_time |
Timestamp of when the task entered the pool.
Definition at line 30 of file AgingPriority.cpp.
Referenced by AgingPriorityPool::enqueue().
| int AgedTask::current_priority |
The boosted priority after aging.
Definition at line 29 of file AgingPriority.cpp.
Referenced by AgingPriorityPool::enqueue(), and operator<().
| std::function<void()> AgedTask::func |
The callable task logic.
Definition at line 31 of file AgingPriority.cpp.
Referenced by AgingPriorityPool::enqueue().
| int AgedTask::original_priority |
The priority assigned at submission.
Definition at line 28 of file AgingPriority.cpp.
Referenced by AgingPriorityPool::enqueue().
| std::string AgedTask::task_name |
Human-readable name for logging.
Definition at line 32 of file AgingPriority.cpp.
Referenced by AgingPriorityPool::enqueue().