Skip to content

task_builder checkpoint

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

nes::task_builder::checkpoint

Functions

(1) [[nodiscard]] std::task_checkpoint checkpoint();
  1. Pushes a checkpoint in the thread pool. A checkpoint will be set once all tasks pushed before it are done. The nes::task_checkpoint can be used to know when all tasks before the checkpoint are done.

Parameters

None.

Return value

  1. Returns a nes::task_checkpoint that will be set once all tasks before the checkpoint are done.

Complexity

  1. This function is [[nodiscard]] because a checkpoint has no effect on the execution, so unused checkpoints are just wasted resources.

Exceptions

May throw a std::bad_alloc.

Clone this wiki locally