Skip to content

thread_pool thread_pool

Alexy Pellegrini edited this page May 9, 2021 · 1 revision

nes::thread_pool::thread_pool

Functions

(1) explicit thread_pool(std::size_t thread_count = std::thread::hardware_concurrency());
(2) thread_pool(const thread_pool&) = delete;
(3) thread_pool(thread_pool&& other) noexcept = delete;
  1. Constructs a thread pool with the specified amount of worker threads.
  2. Deleted copy-constructor.
  3. Deleted move-constructor.

Parameters

Name Description
thread_count Amount of worker threads, if 0 use a default value of 8 worker threads. By default use the value returned by std::thread::hardware_concurrency()

Complexity

  1. Explicit

Exceptions

  1. May throw if thread creation or any memory allocation fail.
  2. Deleted
  3. Deleted
Clone this wiki locally