ThreadSchedule 1.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "chaos.hpp"
4#include "concepts.hpp"
5#include "error_handler.hpp"
6#include "profiles.hpp"
7#include "pthread_wrapper.hpp"
8#include "scheduled_pool.hpp"
9#include "scheduler_policy.hpp"
10#include "thread_pool.hpp"
11#include "thread_pool_with_errors.hpp"
12#include "thread_registry.hpp"
13#include "thread_wrapper.hpp"
14#include "topology.hpp"
15
32
33namespace threadschedule
34{
35
39namespace ts = threadschedule;
40
41// Re-export main types for convenience
42#ifndef _WIN32
44#endif
47using ts::ChaosConfig;
49using ts::CpuTopology;
51using ts::ErrorCallback;
58using ts::JThreadWrapper;
59using ts::JThreadWrapperView;
61using ts::ScheduledFastThreadPool;
62using ts::ScheduledHighPerformancePool;
64using ts::ScheduledThreadPool;
66using ts::SchedulingPolicy;
67using ts::TaskError;
70using ts::ThreadPool;
76
77} // namespace threadschedule
Test/chaos features to perturb scheduling at runtime.
RAII controller that periodically applies chaos operations.
Definition chaos.hpp:40
Global error handler for thread pool tasks.
Fast thread pool with built-in error handling.
Simple high-performance thread pool using single queue with optimized locking.
Future wrapper that provides error callback support.
High-performance thread pool with built-in error handling.
High-performance thread pool optimized for high-frequency task submission.
RAII pthread wrapper with modern C++ interface.
Handle for scheduled tasks that can be used to cancel them.
Thread pool with support for scheduled and periodic tasks.
Simple thread pool with built-in error handling.
Simple thread pool for general-purpose use.
Thread priority wrapper with validation.
Enhanced std::thread wrapper.
High-level thread configuration profiles and helpers.
auto apply_profile(ThreadLike &t, ThreadProfile const &p) -> expected< void, std::error_code >
Apply a profile to a single thread wrapper or view.
Definition profiles.hpp:80
Runtime chaos settings.
Definition chaos.hpp:29
Snapshot of basic CPU/NUMA topology.
Definition topology.hpp:31
Information about a task exception.
Declarative profile describing desired scheduling.
Definition profiles.hpp:27
Hardware topology helpers (CPU count, NUMA nodes) and affinity builders.
auto affinity_for_node(int node_index, int thread_index, int threads_per_node=1) -> ThreadAffinity
Build a ThreadAffinity for the given NUMA node.
Definition topology.hpp:137
auto distribute_affinities_by_numa(size_t num_threads) -> std::vector< ThreadAffinity >
Distribute thread affinities across NUMA nodes in round-robin order.
Definition topology.hpp:162
auto read_topology() -> CpuTopology
Discover basic topology. Linux: reads /sys for NUMA nodes. Windows: single node, sequential CPU indic...
Definition topology.hpp:42