ThreadSchedule 1.0.0
Modern C++ thread management library
|
High-level thread configuration profiles and helpers. More...
#include "concepts.hpp"
#include "scheduler_policy.hpp"
#include "thread_pool.hpp"
#include "thread_registry.hpp"
#include <optional>
#include <string>
Go to the source code of this file.
Classes | |
struct | threadschedule::ThreadProfile |
Declarative profile describing desired scheduling. More... |
Functions | |
auto | threadschedule::profiles::realtime () -> ThreadProfile |
Highest priority profile. Uses FIFO on Linux (if permitted), falls back to OTHER on Windows. | |
auto | threadschedule::profiles::low_latency () -> ThreadProfile |
Low-latency interactive profile using RR scheduling. | |
auto | threadschedule::profiles::throughput () -> ThreadProfile |
Throughput-oriented profile favoring batch scheduling. | |
auto | threadschedule::profiles::background () -> ThreadProfile |
Background profile for very low priority work. | |
template<typename ThreadLike, std::enable_if_t< is_thread_like_v< ThreadLike >, int > = 0> | |
auto | threadschedule::apply_profile (ThreadLike &t, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to a single thread wrapper or view. | |
auto | threadschedule::apply_profile (ThreadControlBlock &t, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to a thread control block. | |
auto | threadschedule::apply_profile (RegisteredThreadInfo &t, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to a registered thread info. | |
auto | threadschedule::apply_profile (ThreadPool &pool, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to all workers of a simple ThreadPool. | |
auto | threadschedule::apply_profile (HighPerformancePool &pool, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to all workers of a HighPerformancePool. | |
auto | threadschedule::apply_profile (ThreadRegistry ®, Tid tid, ThreadProfile const &p) -> expected< void, std::error_code > |
Apply a profile to a registry-controlled thread by TID. |
High-level thread configuration profiles and helpers.
Provides simple presets (e.g. realtime, low_latency, throughput, background) and utility functions to apply them to single threads, thread pools, or registry-managed threads. Profiles abstract low-level flags like policy, priority, and optional CPU affinity into a single intent.
Definition in file profiles.hpp.
|
inline |
Apply a profile to all workers of a HighPerformancePool.
Definition at line 143 of file profiles.hpp.
|
inline |
Apply a profile to a registered thread info.
Definition at line 116 of file profiles.hpp.
|
inline |
Apply a profile to a thread control block.
Definition at line 98 of file profiles.hpp.
|
inline |
Apply a profile to a single thread wrapper or view.
Definition at line 80 of file profiles.hpp.
|
inline |
Apply a profile to all workers of a simple ThreadPool.
Definition at line 124 of file profiles.hpp.
|
inline |
Apply a profile to a registry-controlled thread by TID.
Definition at line 161 of file profiles.hpp.
|
inline |
Background profile for very low priority work.
Definition at line 70 of file profiles.hpp.
|
inline |
Low-latency interactive profile using RR scheduling.
Definition at line 54 of file profiles.hpp.
|
inline |
Highest priority profile. Uses FIFO on Linux (if permitted), falls back to OTHER on Windows.
Definition at line 40 of file profiles.hpp.
|
inline |
Throughput-oriented profile favoring batch scheduling.
Definition at line 62 of file profiles.hpp.