threadman 0.1.0
Header-only C++23 managed threads, dynamic pools, futures, and executors
Loading...
Searching...
No Matches
Public Attributes | List of all members
threadman::ThreadSnapshot Struct Reference

A point-in-time snapshot of a ManagedThread's control block. More...

#include <stats.hpp>

Collaboration diagram for threadman::ThreadSnapshot:
Collaboration graph
[legend]

Public Attributes

std::uint64_t id = 0
 Monotonic per-process id.
 
std::string name
 User-chosen name.
 
std::uint64_t native_id = 0
 OS-level thread id, when known.
 
std::optional< std::uint64_t > pool_id
 Owning pool, when this is a pool worker.
 
ThreadState state = ThreadState::Starting
 
std::chrono::nanoseconds run_duration {0}
 Time the body has been running (or ran).
 
bool failed = false
 True iff state == Failed.
 
bool is_core = true
 Pool worker: not subject to idle retirement.
 

Detailed Description

A point-in-time snapshot of a ManagedThread's control block.

Member Data Documentation

◆ failed

bool threadman::ThreadSnapshot::failed = false

True iff state == Failed.

◆ id

std::uint64_t threadman::ThreadSnapshot::id = 0

Monotonic per-process id.

◆ is_core

bool threadman::ThreadSnapshot::is_core = true

Pool worker: not subject to idle retirement.

◆ name

std::string threadman::ThreadSnapshot::name

User-chosen name.

◆ native_id

std::uint64_t threadman::ThreadSnapshot::native_id = 0

OS-level thread id, when known.

◆ pool_id

std::optional<std::uint64_t> threadman::ThreadSnapshot::pool_id

Owning pool, when this is a pool worker.

◆ run_duration

std::chrono::nanoseconds threadman::ThreadSnapshot::run_duration {0}

Time the body has been running (or ran).

◆ state

ThreadState threadman::ThreadSnapshot::state = ThreadState::Starting

The documentation for this struct was generated from the following file: