MCPcopy Create free account
hub / github.com/bshoshany/thread-pool / thread_pool

Function thread_pool

include/BS_thread_pool.hpp:1457–1457  ·  view source on GitHub ↗

* @brief Construct a new thread pool. The number of threads will be the total number of hardware threads available, as reported by the implementation. This is usually determined by the number of cores in the CPU. If a core is hyperthreaded, it will count as two threads. If the native extensions are enabled, the pool will instead use the number of threads available to the process, as obtained from

Source from the content-addressed store, hash-verified

1455 * @brief Construct a new thread pool. The number of threads will be the total number of hardware threads available, as reported by the implementation. This is usually determined by the number of cores in the CPU. If a core is hyperthreaded, it will count as two threads. If the native extensions are enabled, the pool will instead use the number of threads available to the process, as obtained from `BS::get_os_process_affinity()`, which can be less than the number of hardware threads.
1456 */
1457 thread_pool() : thread_pool(0, [] {}) {}
1458
1459 /**
1460 * @brief Construct a new thread pool with the specified number of threads.

Callers

nothing calls this directly

Calls 1

create_threadsFunction · 0.85

Tested by

no test coverage detected