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::FutureWaitPoolOptions Struct Reference

Configuration for a FutureWaitPool. More...

#include <future_wait_pool.hpp>

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

Public Attributes

std::string name = "tm::future-wait"
 
std::size_t min_workers = 1
 
std::size_t max_workers = std::thread::hardware_concurrency()
 
std::chrono::milliseconds scale_up_wait {THREADMAN_DEFAULT_FUTURE_WAIT_SCALE_UP_WAIT_MS}
 Scale up once the oldest pending wait has queued for this long while every worker is busy.
 
std::size_t scale_up_when_queue_exceeds = 0
 Queue depth above which the pool scales up while saturated.
 
std::chrono::milliseconds idle_timeout {THREADMAN_DEFAULT_IDLE_TIMEOUT_MS}
 A non-core worker idle this long retires.
 
std::chrono::milliseconds scale_check_interval {THREADMAN_DEFAULT_SCALE_CHECK_INTERVAL_MS}
 Scale-evaluation cadence (driven by the manager housekeeper).
 
std::size_t max_pending = 0
 Maximum number of pending waits; 0 = unbounded.
 

Detailed Description

Configuration for a FutureWaitPool.

Mirrors the subset of ThreadPoolOptions relevant to blocking waits, with eager-scaling defaults (scale_up_when_queue_exceeds == 0).

Member Data Documentation

◆ idle_timeout

std::chrono::milliseconds threadman::FutureWaitPoolOptions::idle_timeout {THREADMAN_DEFAULT_IDLE_TIMEOUT_MS}

A non-core worker idle this long retires.

◆ max_pending

std::size_t threadman::FutureWaitPoolOptions::max_pending = 0

Maximum number of pending waits; 0 = unbounded.

Exceeding it makes add(...) throw PoolQueueFullError.

◆ max_workers

std::size_t threadman::FutureWaitPoolOptions::max_workers = std::thread::hardware_concurrency()

◆ min_workers

std::size_t threadman::FutureWaitPoolOptions::min_workers = 1

◆ name

std::string threadman::FutureWaitPoolOptions::name = "tm::future-wait"

◆ scale_check_interval

std::chrono::milliseconds threadman::FutureWaitPoolOptions::scale_check_interval {THREADMAN_DEFAULT_SCALE_CHECK_INTERVAL_MS}

Scale-evaluation cadence (driven by the manager housekeeper).

◆ scale_up_wait

std::chrono::milliseconds threadman::FutureWaitPoolOptions::scale_up_wait {THREADMAN_DEFAULT_FUTURE_WAIT_SCALE_UP_WAIT_MS}

Scale up once the oldest pending wait has queued for this long while every worker is busy.

◆ scale_up_when_queue_exceeds

std::size_t threadman::FutureWaitPoolOptions::scale_up_when_queue_exceeds = 0

Queue depth above which the pool scales up while saturated.

Defaults to 0 — add capacity as soon as anything has to wait, since busy here means blocked, not computing.


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