Function concore::v1::spawn(std::initializer_list<task_function>&&, task_group, bool)

Function Documentation

void concore::v1::spawn(std::initializer_list<task_function> &&ftors, task_group grp, 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 executed

  • grp: The group in which the functors are to be executed

  • wake_workers: True if we should wake other workers for the last task

The wake_workers will 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.

spawn(task&&, bool), spawn_and_wait()