|
ThreadSchedule 3.0.0
Modern C++ thread management library
|
Namespaces | |
| namespace | advanced |
| namespace | detail |
| Aggregates multiple thread_registry_backend instances into a single queryable view. | |
| namespace | schedule |
| Helpers for building scheduling_config values. | |
| namespace | this_thread |
| Portable configuration operations for the calling thread. | |
Classes | |
| class | auto_register_current_thread |
| RAII registration of the calling thread in a portable registry. More... | |
| class | bad_expected_access |
| class | cpu_id |
| Validated CPU identifier. More... | |
| class | expected |
| class | expected< void, E > |
| class | global_registry_binding |
| Temporarily bind an owning registry as the global external registry. More... | |
| class | nice_value |
| Strongly-typed nice value in the POSIX range $[-20, 19]$. More... | |
| struct | pool_statistics |
| Snapshot of pool activity metrics. More... | |
| class | realtime_priority |
| Strongly-typed realtime priority in the range $[1, 99]$. More... | |
| struct | registered_thread |
| Snapshot entry returned by thread_registry::snapshot. More... | |
| class | scheduled_pool |
| Scheduler that executes delayed and periodic tasks on worker threads. More... | |
| class | scheduled_pool_config |
| Builder-style configuration for scheduled_pool. More... | |
| class | scheduled_task |
| class | scheduling_config |
| Immutable scheduling request passed to thread creation/configuration APIs. More... | |
| struct | task_error |
| Captured information about a task failure. More... | |
| class | thread |
| Owning thread wrapper with result-based lifecycle/configuration API. More... | |
| class | thread_affinity |
| class | thread_config |
| Portable thread configuration bundle. More... | |
| class | thread_id |
| class | thread_pool |
| Fixed-size thread pool for queued asynchronous work. More... | |
| class | thread_pool_config |
| Builder-style configuration for thread_pool. More... | |
| class | thread_registry |
| Registry for named/configurable threads. More... | |
| class | thread_view |
| Non-owning view over a running thread or jthread. More... | |
| struct | unexpect_t |
| class | unexpected |
| class | worker_count |
| Value type for pool worker count. More... | |
Typedefs | |
| template<typename T > | |
| using | result = expected< T, std::error_code > |
| Standard result type used by public APIs. | |
| using | error_callback = std::function< void(task_error const &)> |
| Callback signature for asynchronous task error reporting. | |
Enumerations | |
| enum class | build_mode : std::uint8_t { header_only , runtime } |
| Describes whether ThreadSchedule uses inline storage or its shared runtime. More... | |
| enum class | scheduling_intent : std::uint8_t { background , normal , interactive , low_latency , realtime_fifo , realtime_round_robin , nice } |
| Portable scheduling intents that map to platform-specific behavior. More... | |
| enum class | priority_level : std::int8_t { lowest = 19 , low = 5 , normal = 0 , high = -5 , highest = -20 } |
| Portable non-realtime priority levels. More... | |
| enum class | shutdown_policy : std::uint8_t { drain , drop_pending } |
| Defines how pools handle pending work during shutdown. More... | |
| enum class | worker_registration : std::uint8_t { disabled , global_registry } |
| Controls whether pool workers are registered in a thread registry. More... | |
Functions | |
| template<typename T , typename E > | |
| void | swap (expected< T, E > &lhs, expected< T, E > &rhs) noexcept(noexcept(lhs.swap(rhs))) |
| constexpr auto | current_build_mode () noexcept -> build_mode |
| constexpr auto | build_mode_string () noexcept -> char const * |
| auto | global_registry () -> thread_registry & |
Variables | |
| constexpr unexpect_t | unexpect {} |
| constexpr bool | is_runtime_build = false |
| using threadschedule::error_callback = typedef std::function<void(task_error const&)> |
Callback signature for asynchronous task error reporting.
Definition at line 78 of file task_error.hpp.
| using threadschedule::result = typedef expected<T, std::error_code> |
Standard result type used by public APIs.
| T | Value type on success. |
On failure the error channel contains std::error_code.
Definition at line 22 of file result.hpp.
|
strong |
Describes whether ThreadSchedule uses inline storage or its shared runtime.
| Enumerator | |
|---|---|
| header_only | Header-only mode: implementation is compiled into each translation unit. |
| runtime | Runtime mode: implementation is provided by the shared runtime library. |
Definition at line 16 of file runtime.hpp.
|
strong |
Portable non-realtime priority levels.
| Enumerator | |
|---|---|
| lowest | |
| low | |
| normal | |
| high | |
| highest | |
Definition at line 43 of file scheduling.hpp.
|
strong |
Portable scheduling intents that map to platform-specific behavior.
Definition at line 24 of file scheduling.hpp.
|
strong |
Defines how pools handle pending work during shutdown.
| Enumerator | |
|---|---|
| drain | Finish queued work before returning from shutdown. |
| drop_pending | Cancel/drop queued work that has not started yet. |
Definition at line 16 of file shutdown_policy.hpp.
|
strong |
Controls whether pool workers are registered in a thread registry.
| Enumerator | |
|---|---|
| disabled | Do not register workers in the global registry. |
| global_registry | Register workers in the global registry for discovery/control. |
Definition at line 16 of file worker_registration.hpp.
|
inlineconstexprnoexcept |
Definition at line 38 of file runtime.hpp.
References is_runtime_build.
|
inlineconstexprnoexcept |
Definition at line 31 of file runtime.hpp.
References header_only.
|
inline |
Definition at line 341 of file thread_registry.hpp.
|
noexcept |
Definition at line 1238 of file expected.hpp.
|
inlineconstexpr |
Definition at line 28 of file runtime.hpp.
Referenced by build_mode_string().
|
inlineconstexpr |
Definition at line 44 of file expected.hpp.