Implementation of IThreadGroup.
More...
#include <System.hpp>
Implementation of IThreadGroup.
void add |
( |
void *(*)(void *) |
mainloop, |
|
|
void * |
data |
|
) |
| |
|
virtual |
Add a thread to the group. A thread is created and the provided mainloop is launched as the main function of this thread.
- Parameters
-
[in] | mainloop | : mainloop of the added thread. |
[in] | data | : data to be given to the main loop |
Implements IThreadGroup.
This method is used to gather exceptions occurring during the execution of the threads of the group. By doing this, we can launch an ExceptionComposite when all the threads of the group are finished.
- Parameters
-
[in] | e | : exception thrown by one of the thread. |
Implements IThreadGroup.
Get a thread of the group from one id
- Parameters
-
- Returns
- the IThreadGroup instance if found, NULL otherwise
Get thread information (IThread and index within the group);
- Parameters
-
- Returns
- true if found
Get an exception that holds all the information of exceptions that have occurred during the execution of the threads of the group.
- Returns
- the gathering exception.
Implements IThreadGroup.
bool hasExceptions |
( |
| ) |
const |
|
inlinevirtual |
Tells whether or not exceptions have been added to the thread group.
- Returns
- true if some exception has been added, false otherwise
Implements IThreadGroup.
Get the ith thread of the group.
- Parameters
-
[in] | idx | : index of the thread in the group |
- Returns
- the thread
Implements IThreadGroup.
Get the number of threads in the group.
- Returns
- the number of threads
Implements IThreadGroup.
Start all the threads of the group at the same time. Implementations should ensure this by some synchronization mechanism.
Implements IThreadGroup.
The documentation for this class was generated from the following files:
- /builds/workspace/publish-doc-api-gitlab/gatb-core/src/gatb/system/impl/System.hpp
- /builds/workspace/publish-doc-api-gitlab/gatb-core/src/gatb/system/impl/System.cpp