Container for managing a group of joinable threads.
Declared in <bslmt_threadgroup.h>
class ThreadGroup;
This class provides a simple mechanism for managing a group of joinable threads. The destructor ensures that any running threads are detached so that resources are not leaked. This class is thread-enabled, thread-safe, and exception-neutral.
| Name | Description |
|---|---|
ThreadGroup [constructor] | Create an empty thread group. |
~ThreadGroup [destructor] | Destroy this object. Any threads not joined will be allowed to run independently, and will no longer be joinable. |
addThread | addThread overloads |
addThreads | addThreads overloads |
joinAll | Block the calling thread until all threads started in this group have finished executing. |
numThreads | Return a snapshot of the number of threads started in this group that have not been joined. |