#include <ArmarXCore/core/services/tasks/RunningTask.h>
|
| | RunningTask (T *parent, method_type runningFn, const std::string &name="") |
| | Constructs a running task within the class parent which calls the runningFn in a new thread.
|
| |
| std::string | getName () const |
| |
| bool | isFinished () const |
| | Retrieve finished state of the thread.
|
| |
| bool | isRunning () const |
| | Retrieve running state of the thread.
|
| |
| bool | isStopped () |
| | Retrieve whether stop() has been called.
|
| |
| void | join () |
| | Wait for the RunningTask to finish without telling it to finish.
|
| |
| | RunningTaskBase (std::string const &name) |
| |
| template<typename T> |
| | RunningTaskBase (T *parent, void(T::*runningFn)(), const std::string &name="") |
| | Constructs a running task within the class parent which calls the runningFn in a new thread.
|
| |
| void | setName (const std::string &name) |
| |
| void | setThreadList (ThreadListPtr threadList) |
| |
| void | start () |
| | Starts the thread.
|
| |
| void | stop (bool waitForJoin=true) |
| | Stops the thread.
|
| |
| bool | waitForFinished (int timeoutMS=-1) |
| | wait blocking for thread to be finished.
|
| |
| void | waitForStop () |
| | Wait blocking for thread until stop() has been called.
|
| |
| | ~RunningTaskBase () override |
| | Destructor stops the thread and waits for completion.
|
| |
◆ method_type
| typedef void(T::* method_type) (void) |
Typedef for the thread method.
Thread methods need to follow the template void methodName(void). Parameter passing is not used since methods are members of the class.
◆ pointer_type
Shared pointer type for convenience.
◆ RunningTask()
Constructs a running task within the class parent which calls the runningFn in a new thread.
- Parameters
-
| name | of this thread, that describes what it is doing. If string is empty, it will use the name of the class with RTTI |
The documentation for this class was generated from the following files: