Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
kcenon::thread::job_components Struct Reference

Internal structure holding composed behaviors for a job. More...

#include <job.h>

Collaboration diagram for kcenon::thread::job_components:
Collaboration graph

Public Attributes

std::function< void(common::VoidResult)> on_complete
 Callback invoked when job completes (success or error)
 
std::function< void(const common::error_info &)> on_error
 Callback invoked specifically on error.
 
std::optional< job_prioritypriority
 Optional priority override for this job.
 
std::optional< retry_policyretry
 Retry policy for automatic retry on failure.
 
std::optional< std::chrono::milliseconds > timeout
 Optional timeout for job execution.
 
bool has_explicit_cancellation {false}
 Flag indicating explicit cancellation token was set via composition.
 

Detailed Description

Internal structure holding composed behaviors for a job.

This structure enables the composition pattern by storing optional callbacks and behaviors that can be attached to any job instance. The components are lazily allocated only when first needed.

Definition at line 68 of file job.h.

Member Data Documentation

◆ has_explicit_cancellation

bool kcenon::thread::job_components::has_explicit_cancellation {false}

Flag indicating explicit cancellation token was set via composition.

Definition at line 86 of file job.h.

86{false};

◆ on_complete

std::function<void(common::VoidResult)> kcenon::thread::job_components::on_complete

Callback invoked when job completes (success or error)

Definition at line 71 of file job.h.

◆ on_error

std::function<void(const common::error_info&)> kcenon::thread::job_components::on_error

Callback invoked specifically on error.

Definition at line 74 of file job.h.

◆ priority

std::optional<job_priority> kcenon::thread::job_components::priority

Optional priority override for this job.

Definition at line 77 of file job.h.

◆ retry

std::optional<retry_policy> kcenon::thread::job_components::retry

Retry policy for automatic retry on failure.

Definition at line 80 of file job.h.

◆ timeout

std::optional<std::chrono::milliseconds> kcenon::thread::job_components::timeout

Optional timeout for job execution.

Definition at line 83 of file job.h.


The documentation for this struct was generated from the following file: