-
Notifications
You must be signed in to change notification settings - Fork 7
task_builder execute
Alairion edited this page May 11, 2021
·
3 revisions
nes::task_builder::execute
template<typename Func, typename... Args>
(1) void execute(Func&& func, Args&&... args);
- 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 callingstd::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.
Name | Description |
---|---|
func |
The function to be executed. |
args |
The arguments to be passed to func . |
None.
-
func
must be movable, andstd::invoke(func, args...);
must be well-formed.
May throw a std::bad_alloc
.