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::TaskHandle::State Struct Reference

Heap-resident bookkeeping for a single task. More...

#include <task.hpp>

Collaboration diagram for threadman::TaskHandle::State:
Collaboration graph
[legend]

Public Attributes

std::uint64_t id = 0
 
std::optional< std::string > name
 
std::uint64_t pool_id = 0
 
std::atomic< TaskStatestate {TaskState::Queued}
 
std::chrono::steady_clock::time_point created_at {std::chrono::steady_clock::now()}
 
std::optional< std::chrono::steady_clock::time_point > started_at
 
std::optional< std::chrono::steady_clock::time_point > finished_at
 
std::exception_ptr exception
 
std::mutex mtx
 

Detailed Description

Heap-resident bookkeeping for a single task.

Shared by the pool, the associated future, and any extra handles users keep.

Member Data Documentation

◆ created_at

std::chrono::steady_clock::time_point threadman::TaskHandle::State::created_at {std::chrono::steady_clock::now()}

◆ exception

std::exception_ptr threadman::TaskHandle::State::exception

◆ finished_at

std::optional<std::chrono::steady_clock::time_point> threadman::TaskHandle::State::finished_at

◆ id

std::uint64_t threadman::TaskHandle::State::id = 0

◆ mtx

std::mutex threadman::TaskHandle::State::mtx
mutable

◆ name

std::optional<std::string> threadman::TaskHandle::State::name

◆ pool_id

std::uint64_t threadman::TaskHandle::State::pool_id = 0

◆ started_at

std::optional<std::chrono::steady_clock::time_point> threadman::TaskHandle::State::started_at

◆ state

std::atomic<TaskState> threadman::TaskHandle::State::state {TaskState::Queued}

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