Skip to content

task_builder execute

Alairion edited this page May 11, 2021 · 3 revisions

Functions

    template<typename Func, typename... Args>
(1) void execute(Func&& func, Args&&... args);
  1. Pushes a task in the task list, without returning a nes::task_result (it saves a promise allocation). The return value of the function, if any, will be discarded. The function will be called as-if by calling std::invoke(func, args...);. The arguments to the function are moved or copied by value, if a reference argument needs to be passed, it has to be wrapped using std::[c]ref, or any other wrapper.

Parameters

Name Description
func The function to be executed.
args The arguments to be passed to func.

Return value

None.

Preconditions

  1. func must be movable, and std::invoke(func, args...); must be well-formed.

Exceptions

May throw a std::bad_alloc.

Clone this wiki locally