30#include <IceUtil/Thread.h>
33#include <ArmarXCore/interface/core/ThreadingIceBase.h>
42 virtual public IceUtil::Thread,
43 virtual protected RunningTaskIceBase
63 callback = [parent, runningFn]() {
return (parent->*runningFn)(); };
71 void setName(
const std::string& name);
85 void stop(
bool waitForJoin =
true);
97 bool isRunning()
const;
104 bool isFinished()
const;
111 bool waitForFinished(
int timeoutMS = -1);
125 std::string getName()
const;
131 std::unique_ptr<Impl> impl;
#define ARMARXCORE_IMPORT_EXPORT
std::function< void()> CallbackT
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.
RunningTaskBase(std::string const &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.
IceUtil::Handle< RunningTask< T > > pointer_type
Shared pointer type for convenience.
void(T::* method_type)(void)
Typedef for the thread method.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< ThreadList > ThreadListPtr
std::string GetTypeString(const std::type_info &tinf, bool withoutNamespaceSpecifier=false)