Skip to content

task_builder task_builder

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

nes::task_builder::task_builder

Functions

(1) explicit task_builder(std::size_t thread_count = std::thread::hardware_concurrency());
(2) task_builder(const task_builder&) = delete;
(3) task_builder(task_builder&& other) noexcept;
  1. Constructs a thread pool with the specified amount of worker threads.
  2. Deleted copy-constructor.
  3. Move-constructs a task builder, other become invalid after this call. If other was invalid before this call, *this will be invalid.

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(). This value may be used to optimize concurrency within the task list, and should match the thread count of the thread pool where the task list will be pushed.
other A task builder instance

Complexity

  1. Explicit
  2. Deleted.

Exceptions

  1. May throw std::bad_alloc.
  2. Deleted.
  3. Does not throw.

Clone this wiki locally