|
| void | runningFn () |
| |
| | SimpleRunningTask (Functor f, std::string name="") |
| |
| | 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.
|
| |
template<class Functor = std::function<void(void)>>
class armarx::SimpleRunningTask< Functor >
Usage:
SimpleRunningTask<>::pointer_type task = new SimpleRunningTask<>([&]
{
ARMARX_INFO << "Hello world from another thread";
});
task->start();
Definition at line 85 of file TaskUtil.h.