|
threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
|
Namespaces | |
| namespace | detail |
| namespace | log |
| namespace | metrics |
Classes | |
| class | BrokenPromiseError |
A Promise was dropped before it satisfied its Future. More... | |
| class | ContinuationAlreadyRegisteredError |
A second .then() was registered on a one-shot threadman::Future. More... | |
| class | Exception |
| Root of every exception thrown by ThreadMan. More... | |
| class | ExecutorRef |
Wraps any Executor-conforming type behind the virtual IExecutor interface, so functions that take IExecutor& accept it. More... | |
| class | Future |
| class | FutureAlreadyRetrievedError |
Promise::get_future() was called more than once on the same promise. More... | |
| class | FutureError |
| Generic future/promise error. More... | |
| struct | FutureSnapshot |
| A snapshot of a future-state object. Useful for diagnostics. More... | |
| class | FutureSnapshotCell |
| class | FutureWaitPool |
| Elastic executor for blocking future-waits. More... | |
| struct | FutureWaitPoolOptions |
Configuration for a FutureWaitPool. More... | |
| class | HousekeeperError |
| A failure originating from the housekeeping thread (listener crashed, internal invariant violated). More... | |
| class | IExecutor |
| Virtual interface for "anything that can run a `std::function<void()>`". More... | |
| class | InlineExecutor |
Runs task() synchronously on the calling thread. More... | |
| class | ManagedThread |
| struct | ManagerSummary |
Aggregate publish-payload produced periodically by the ThreadManager's housekeeper. More... | |
| class | ManagerSummaryCell |
| class | PoolQueueFullError |
| Submitting work to a bounded pool whose queue is already at capacity. More... | |
| class | PoolShuttingDownError |
| Submitting work to a pool that is shutting down or terminated. More... | |
| class | Promise |
| class | PromiseAlreadySatisfiedError |
set_value() / set_exception() was called twice on the same promise. More... | |
| class | SharedFuture |
| class | SingleThreadExecutor |
| struct | StuckTaskEvent |
A single stuck-task event published to StuckTaskListeners. More... | |
| class | TaskCancelledError |
A queued task was cancelled — typically because shutdown_now() drained the queue before the task could run. More... | |
| class | TaskHandle |
| struct | TaskSnapshot |
| A snapshot of a single task's lifecycle. More... | |
| class | TaskSnapshotCell |
| class | ThreadManager |
| class | ThreadPool |
| struct | ThreadPoolOptions |
| struct | ThreadPoolStats |
| A snapshot of a pool's headline counters. More... | |
| class | ThreadPoolStatsCell |
| struct | ThreadSnapshot |
A point-in-time snapshot of a ManagedThread's control block. More... | |
| class | ThreadSnapshotCell |
Concepts | |
| concept | Executor |
Duck-typed alternative to IExecutor for templated code that wants to avoid a virtual call. | |
Enumerations | |
| enum class | ThreadState : std::uint8_t { Starting , Running , Idle , Retiring , Completed , Failed } |
Lifecycle state of a ManagedThread / pool worker. More... | |
| enum class | TaskState : std::uint8_t { Queued , Running , Completed , Failed , Cancelled } |
Lifecycle state of a TaskHandle. More... | |
| enum class | PoolState : std::uint8_t { Running , ShuttingDown , ShutdownNow , Terminated } |
Lifecycle state of a ThreadPool. More... | |
Functions | |
| NLOHMANN_JSON_SERIALIZE_ENUM (ThreadState, { {ThreadState::Starting, "starting"}, {ThreadState::Running, "running"}, {ThreadState::Idle, "idle"}, {ThreadState::Retiring, "retiring"}, {ThreadState::Completed, "completed"}, {ThreadState::Failed, "failed"}, }) NLOHMANN_JSON_SERIALIZE_ENUM(TaskState | |
| void | register_cells (parcel::ParcelRegistry ®istry) |
|
strong |
Lifecycle state of a ThreadPool.
|
strong |
Lifecycle state of a TaskHandle.
|
strong |
Lifecycle state of a ManagedThread / pool worker.
Idle and Retiring are pool-worker-specific: a worker can park on the queue waiting for work (Idle), or be marked for retirement after idle-timeout (Retiring).
| threadman::NLOHMANN_JSON_SERIALIZE_ENUM | ( | ThreadState | , |
| { {ThreadState::Starting, "starting"}, {ThreadState::Running, "running"}, {ThreadState::Idle, "idle"}, {ThreadState::Retiring, "retiring"}, {ThreadState::Completed, "completed"}, {ThreadState::Failed, "failed"}, } | |||
| ) |
|
inline |