Skip to content

task_builder fence

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

Functions

(1) [[nodiscard]] nes::task_fence fence();
  1. Pushes a fence in the thread pool. A fence is a execution dependency between all tasks pushed before it and any point of the program, i.e. preventing the execution of the tasks pushed after it until it is signaled.

Parameters

None.

Return value

  1. Returns a nes::task_fence that needs to be signaled to enable the task list to pass through it.

Complexity

  1. This function is [[nodiscard]] because if the fence is discarded, the task list will always be deadlocked.

Exceptions

May throw a std::bad_alloc.

Clone this wiki locally