ThreadSchedule 3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
threadschedule::thread_pool_config Class Reference

Builder-style configuration for thread_pool. More...

#include <thread_pool.hpp>

Public Member Functions

auto set_worker_count (worker_count value) noexcept -> thread_pool_config &
 Set number of worker threads.
 
auto set_registration (worker_registration value) noexcept -> thread_pool_config &
 Configure registry registration behavior for workers.
 
auto set_worker_config (thread_config value) -> thread_pool_config &
 Set startup configuration applied to worker threads.
 
auto set_shutdown_policy (shutdown_policy value) noexcept -> thread_pool_config &
 Set shutdown behavior used by thread_pool::shutdown and destructor.
 
auto set_error_callback (error_callback value) -> thread_pool_config &
 Set callback invoked when posted/submitted work throws.
 
auto get_worker_count () const noexcept -> worker_count
 Return configured worker count.
 
auto get_registration () const noexcept -> worker_registration
 Return configured worker registration mode.
 
auto get_worker_config () const noexcept -> thread_config const &
 Return worker thread configuration.
 
auto get_shutdown_policy () const noexcept -> shutdown_policy
 Return configured shutdown policy.
 
auto get_error_callback () const noexcept -> error_callback const &
 Return configured asynchronous task error callback.
 

Detailed Description

Builder-style configuration for thread_pool.

Definition at line 30 of file thread_pool.hpp.

Member Function Documentation

◆ get_error_callback()

auto threadschedule::thread_pool_config::get_error_callback ( ) const -> error_callback const&
inlinenoexcept

Return configured asynchronous task error callback.

Definition at line 98 of file thread_pool.hpp.

Referenced by threadschedule::thread_pool::post(), and threadschedule::thread_pool::submit().

◆ get_registration()

auto threadschedule::thread_pool_config::get_registration ( ) const -> worker_registration
inlinenoexcept

Return configured worker registration mode.

Definition at line 80 of file thread_pool.hpp.

◆ get_shutdown_policy()

auto threadschedule::thread_pool_config::get_shutdown_policy ( ) const -> shutdown_policy
inlinenoexcept

Return configured shutdown policy.

Definition at line 92 of file thread_pool.hpp.

Referenced by threadschedule::thread_pool::shutdown().

◆ get_worker_config()

auto threadschedule::thread_pool_config::get_worker_config ( ) const -> thread_config const&
inlinenoexcept

Return worker thread configuration.

Definition at line 86 of file thread_pool.hpp.

Referenced by threadschedule::thread_pool::thread_pool().

◆ get_worker_count()

auto threadschedule::thread_pool_config::get_worker_count ( ) const -> worker_count
inlinenoexcept

Return configured worker count.

Definition at line 74 of file thread_pool.hpp.

◆ set_error_callback()

auto threadschedule::thread_pool_config::set_error_callback ( error_callback  value) -> thread_pool_config&
inline

Set callback invoked when posted/submitted work throws.

Parameters
valueError callback receiving captured task_error.

Definition at line 66 of file thread_pool.hpp.

◆ set_registration()

auto threadschedule::thread_pool_config::set_registration ( worker_registration  value) -> thread_pool_config&
inlinenoexcept

Configure registry registration behavior for workers.

Definition at line 42 of file thread_pool.hpp.

◆ set_shutdown_policy()

auto threadschedule::thread_pool_config::set_shutdown_policy ( shutdown_policy  value) -> thread_pool_config&
inlinenoexcept

Set shutdown behavior used by thread_pool::shutdown and destructor.

Definition at line 56 of file thread_pool.hpp.

◆ set_worker_config()

auto threadschedule::thread_pool_config::set_worker_config ( thread_config  value) -> thread_pool_config&
inline

Set startup configuration applied to worker threads.

Definition at line 49 of file thread_pool.hpp.

◆ set_worker_count()

auto threadschedule::thread_pool_config::set_worker_count ( worker_count  value) -> thread_pool_config&
inlinenoexcept

Set number of worker threads.

Definition at line 35 of file thread_pool.hpp.


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