threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
Loading...
Searching...
No Matches
display.hpp
Go to the documentation of this file.
1#pragma once
2
12
13#include <threadman/stats.hpp>
14
15#include <commons/display_info.hpp>
16
17namespace comms {
18
19template <>
20struct HasDisplayInfo<::threadman::ThreadState> {
21 [[nodiscard]] static const DisplayInfo& display_info() {
22 static const DisplayInfo info{
23 .name = "ThreadState",
24 .description = "Lifecycle state of a ManagedThread or pool worker.",
25 .icon = Icon::from("mdi:cog"),
26 };
27 return info;
28 }
29};
30
31template <>
32struct HasDisplayInfo<::threadman::TaskState> {
33 [[nodiscard]] static const DisplayInfo& display_info() {
34 static const DisplayInfo info{
35 .name = "TaskState",
36 .description = "Lifecycle state of a TaskHandle.",
37 .icon = Icon::from("mdi:format-list-checkbox"),
38 };
39 return info;
40 }
41};
42
43template <>
44struct HasDisplayInfo<::threadman::PoolState> {
45 [[nodiscard]] static const DisplayInfo& display_info() {
46 static const DisplayInfo info{
47 .name = "PoolState",
48 .description = "Lifecycle state of a ThreadPool.",
49 .icon = Icon::from("mdi:server"),
50 };
51 return info;
52 }
53};
54
55} // namespace comms
Definition display.hpp:17
TaskState
Lifecycle state of a TaskHandle.
Definition stats.hpp:31
ThreadState
Lifecycle state of a ManagedThread / pool worker.
Definition stats.hpp:21
PoolState
Lifecycle state of a ThreadPool.
Definition stats.hpp:40
Plain value snapshots of the live state of the ThreadMan world — threads, pools, tasks,...
static const DisplayInfo & display_info()
Definition display.hpp:45
static const DisplayInfo & display_info()
Definition display.hpp:33
static const DisplayInfo & display_info()
Definition display.hpp:21