30 template <
typename job_type>
58 const std::string& name =
"typed_job");
77 [[nodiscard]]
auto do_work(
void) -> common::VoidResult
override;
98 template <
typename job_type>
100 const std::function<common::VoidResult(
void)>&
callback,
102 const std::string& name)
108 template <
typename job_type>
111 template <
typename job_type>
Callback-based typed job template.
callback_typed_job_t(const std::function< common::VoidResult(void)> &callback, job_type priority, const std::string &name="typed_job")
Constructs a new callback_typed_job_t with a callback, priority, and name.
~callback_typed_job_t(void) override
Virtual destructor for the callback_typed_job_t class.
std::function< common::VoidResult(void)> callback_
The user-provided callback function to execute when the job is processed.
auto do_work(void) -> common::VoidResult override
Executes the stored callback function for this job.
auto priority() const -> job_type
Retrieves the priority level of this job.
@ callback
Call user callback for custom decision.
Core threading foundation of the thread system library.
@ priority
Priority-based scheduling.
Base typed job carrying a specific priority level.