ASL
Loading...
Searching...
No Matches
ThreadGroup< Thread > Class Template Reference

Detailed Description

template<class Thread>
class asl::ThreadGroup< Thread >

A ThreadGroup is a set of threads that start at the same time and can be waited for termination.

experimental and deprecated API**

In this example there is an array of tasks to do. Each Worker is a thread that performs a subset of the tasks: one does the first half and the other the second half.

ThreadGroup<Worker> threads;
threads << Worker(tasks.slice(0, tasks.length()/2));
threads << Worker(tasks.slice(tasks.length()/2, tasks.length()));
threads.start();
threads.join();
Deprecated

#include <asl/Thread.h>


The documentation for this class was generated from the following file:
  • Thread.h