|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Scheduler interface for queuing and retrieving jobs. More...
#include <scheduler_interface.h>


Public Member Functions | |
| virtual | ~scheduler_interface ()=default |
| virtual auto | schedule (std::unique_ptr< job > &&work) -> common::VoidResult=0 |
| Enqueue a job for processing. | |
| virtual auto | get_next_job () -> common::Result< std::unique_ptr< job > >=0 |
| Dequeue the next available job. | |
Scheduler interface for queuing and retrieving jobs.
This interface defines the contract for job scheduling implementations, allowing different scheduling strategies (FIFO, priority-based, etc.) to be plugged into the thread system.
Implementations must ensure thread-safe access to all methods:
Definition at line 52 of file scheduler_interface.h.
|
virtualdefault |
|
pure virtual |
Dequeue the next available job.
Thread Safety: Must be thread-safe, callable from multiple worker threads
Implemented in kcenon::thread::adaptive_job_queue, kcenon::thread::detail::lockfree_job_queue, kcenon::thread::job_queue, and kcenon::thread::policy_queue< SyncPolicy, BoundPolicy, OverflowPolicy >.
|
pure virtual |
Enqueue a job for processing.
| work | Job to schedule for execution |
Thread Safety: Must be thread-safe, callable from any thread
Implemented in kcenon::thread::adaptive_job_queue, kcenon::thread::detail::lockfree_job_queue, kcenon::thread::job_queue, and kcenon::thread::policy_queue< SyncPolicy, BoundPolicy, OverflowPolicy >.