Function concore::v1::spawn(std::initializer_list<task_function>&&, bool)¶
Defined in File spawn.hpp
Function Documentation¶
-
void
concore::v1::spawn(std::initializer_list<task_function> &&ftors, bool wake_workers = true)¶ Spawn multiple tasks, given the functors to be executed.
This is similar to the other two
spawn() functions, but it takes a series of functions to be executed. Tasks will be created for all these functions and spawn accordingly.- Parameters
ftors: A list of functors to be executedwake_workers: True if we should wake other workers for the last task
The
wake_workerswill control whether to wake threads for the last task or not. For the others tasks, it is assumed that we always want to wake other workers to attempt to get as many tasks as possible from the current worker task list.If the current task has a task group associated, all the newly created tasks will inherit that group.
spawn(task&&, bool), spawn_and_wait()