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.
Synopsis
Declared in <bslmt_threadgroup.h>
class ThreadGroup;
Member Functions
Name |
Description |
|
Create an empty thread group. Optionally specify |
|
Destroy this object. Any threads not joined will be allowed to run independently, and will no longer be joinable. |
|
|
|
|
Block the calling thread until all threads started in this group have finished executing. |
|
Return a snapshot of the number of threads started in this group that have not been joined. |
Created with MrDocs