54 template <
typename job_type>
68 std::function<common::VoidResult()> work,
69 const std::string& name =
"aging_job");
89 [[nodiscard]] auto
do_work() -> common::VoidResult override;
152 [[nodiscard]] auto
wait_time() const ->
std::chrono::milliseconds;
164 std::function<common::VoidResult()>
work_;
A typed job with priority aging support.
std::function< common::VoidResult()> work_
auto get_aged_priority() const -> const aged_priority< job_type > &
Gets the aged priority information.
auto do_work() -> common::VoidResult override
Executes the job's work function.
aging_typed_job_t(const aging_typed_job_t &)=delete
auto effective_priority() const -> job_type
Gets the effective priority after applying boost.
aged_priority< job_type > aged_priority_
auto set_max_boost(int max) -> void
Sets the maximum allowed boost.
auto to_job_info() const -> job_info
Creates job_info for starvation callbacks.
auto operator=(const aging_typed_job_t &) -> aging_typed_job_t &=delete
auto reset_boost() -> void
Resets the priority boost to zero.
auto is_max_boosted() const -> bool
Checks if this job has reached maximum boost.
aging_typed_job_t(job_type priority, std::function< common::VoidResult()> work, const std::string &name="aging_job")
Constructs a new aging typed job.
auto get_max_boost() const -> int
Gets the maximum allowed boost.
~aging_typed_job_t() override
Destroys the aging typed job.
aging_typed_job_t(aging_typed_job_t &&) noexcept=default
auto apply_boost(int boost_amount) -> void
Applies a priority boost to this job.
auto wait_time() const -> std::chrono::milliseconds
Gets the time this job has been waiting.
auto priority() const -> job_type
Retrieves the priority level of this job.
Core threading foundation of the thread system library.
Configuration for priority aging and starvation prevention.
Priority with aging support.
Information about a job for starvation callback.
Base typed job carrying a specific priority level.