Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
Loading...
Searching...
No Matches
scheduler_interface.h
Go to the documentation of this file.
1/*
2 * BSD 3-Clause License
3 * Copyright (c) 2025, DongCheol Shin
4 */
5
13#pragma once
14
15#include <memory>
16
19
20namespace kcenon::thread {
21
53public:
54 virtual ~scheduler_interface() = default;
55
63 virtual auto schedule(std::unique_ptr<job>&& work) -> common::VoidResult = 0;
64
71 virtual auto get_next_job() -> common::Result<std::unique_ptr<job>> = 0;
72};
73
74} // namespace kcenon::thread
75
Scheduler interface for queuing and retrieving jobs.
virtual ~scheduler_interface()=default
virtual auto get_next_job() -> common::Result< std::unique_ptr< job > >=0
Dequeue the next available job.
virtual auto schedule(std::unique_ptr< job > &&work) -> common::VoidResult=0
Enqueue a job for processing.
Error codes and utilities for the thread system.
Base job class for schedulable work units in the thread system.
Core threading foundation of the thread system library.
Definition thread_impl.h:17