|
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::is_thread_like< ThreadWrapper > |
| struct | threadschedule::is_thread_like< ThreadWrapperView > |
| struct | threadschedule::ThreadProfile |
| Declarative profile bundling scheduling intent for a thread. 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 thread wrapper or view. | |
| auto | threadschedule::apply_profile (ThreadControlBlock &t, ThreadProfile const &p) -> expected< void, std::error_code > |
| Apply a profile to a ThreadControlBlock directly. | |
| auto | threadschedule::apply_profile (RegisteredThreadInfo &t, ThreadProfile const &p) -> expected< void, std::error_code > |
| Apply a profile to a registered thread via its info record. | |
| auto | threadschedule::apply_profile (ThreadPool &pool, ThreadProfile const &p) -> expected< void, std::error_code > |
| Apply a profile to every worker in a ThreadPool. | |
| auto | threadschedule::apply_profile (HighPerformancePool &pool, ThreadProfile const &p) -> expected< void, std::error_code > |
| Apply a profile to every worker in a HighPerformancePool. | |
| auto | threadschedule::apply_profile (ThreadRegistry ®, Tid tid, ThreadProfile const &p) -> expected< void, std::error_code > |
| Apply a profile to a registry-managed thread identified 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 every worker in a HighPerformancePool.
Uses "hp" as the thread name prefix passed to HighPerformancePool::configure_threads().
| pool | High-performance pool to configure. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 209 of file profiles.hpp.
|
inline |
Apply a profile to a registered thread via its info record.
Dereferences t.control and delegates to the ThreadControlBlock overload.
t.control is nullptr.| t | Registered thread info whose control pointer is dereferenced. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 168 of file profiles.hpp.
|
inline |
Apply a profile to a ThreadControlBlock directly.
| t | Control block whose underlying thread will be reconfigured. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 141 of file profiles.hpp.
|
inline |
Apply a profile to a thread wrapper or view.
SFINAE-constrained: only participates in overload resolution when is_thread_like_v<ThreadLike> is true (ThreadWrapper, JThreadWrapper, PThreadWrapper, and their views).
| ThreadLike | A type satisfying the is_thread_like trait. |
| t | Thread wrapper or view to configure. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 119 of file profiles.hpp.
|
inline |
Apply a profile to every worker in a ThreadPool.
Uses "pool" as the thread name prefix passed to ThreadPool::configure_threads().
| pool | Thread pool to configure. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 183 of file profiles.hpp.
|
inline |
Apply a profile to a registry-managed thread identified by TID.
| reg | Thread registry that owns the thread. |
| tid | Thread identifier within the registry. |
| p | Profile to apply. |
operation_not_permitted. Definition at line 232 of file profiles.hpp.
|
inline |
Background profile for very low priority work.
Definition at line 100 of file profiles.hpp.
|
inline |
Low-latency interactive profile using RR scheduling.
Definition at line 84 of file profiles.hpp.
|
inline |
Highest priority profile. Uses FIFO on Linux (if permitted), falls back to OTHER on Windows.
Definition at line 70 of file profiles.hpp.
|
inline |
Throughput-oriented profile favoring batch scheduling.
Definition at line 92 of file profiles.hpp.