task_set is a group of future<void>'s from a thread_queue that you can add to, and when you either call wait() or just leave the task_set's scope, it will wait for all the tasks in the set to be done before proceeding.
A typical idiom for using this is:
void myfunc (int id) { ... do something ... }
thread_pool* pool (default_thread_pool()); { task_set tasks (pool); // Launch a bunch of tasks into the thread pool for (int i = 0; i < ntasks; ++i) tasks.push (pool->push (myfunc)); // The following brace, by ending the scope of 'tasks', will // wait for all those queue tasks to finish. }
Definition at line 790 of file thread.h.