boost::capy::thread_pool::thread_pool

Construct a thread pool.

Synopsis

explicit
thread_pool(
    std::size_t num_threads = 0,
    std::string_view thread_name_prefix = "capy‐pool‐");

Description

Creates a pool with the specified number of worker threads. If num_threads is zero, the number of threads is set to the hardware concurrency, or one if that cannot be determined.

Parameters

Name Description

num_threads

The number of worker threads, or zero for automatic selection.

thread_name_prefix

The prefix for worker thread names. Thread names appear as "{prefix}0", "{prefix}1", etc. The prefix is truncated to 12 characters. Defaults to "capy‐pool‐".

Created with MrDocs