casacore
|
Group of threads. More...
#include <threadgroup.h>
Public Member Functions | |
threadgroup () | |
Constructor. More... | |
~threadgroup () | |
Destructor. More... | |
template<typename T > | |
void | create_thread (T threadFunc) |
Create a new thread that will execute the given functor. More... | |
void | join_all () |
Join all threads in the group that have not yet been joined. More... | |
bool | empty () const |
Get state of thread group. More... | |
Private Attributes | |
std::vector< std::thread > | _threads |
Group of threads.
Definition at line 13 of file threadgroup.h.
|
inline |
Constructor.
Definition at line 16 of file threadgroup.h.
|
inline |
Destructor.
Will join all threads that have not been joined yet.
Definition at line 18 of file threadgroup.h.
References join_all().
|
inline |
Create a new thread that will execute the given functor.
The new thread will be added to the group.
threadFunc | The functor to be called. |
Definition at line 26 of file threadgroup.h.
References _threads.
|
inline |
Get state of thread group.
Definition at line 45 of file threadgroup.h.
References _threads.
|
inline |
Join all threads in the group that have not yet been joined.
Definition at line 33 of file threadgroup.h.
References _threads.
Referenced by ~threadgroup().
|
private |
Definition at line 48 of file threadgroup.h.
Referenced by create_thread(), empty(), and join_all().