22 #ifndef OmniThreadCreator_h_
23 #define OmniThreadCreator_h_
25 #include <omnithread.h>
90 template<
class ThreadMaster>
97 typedef void(ThreadMaster::*
Action)();
102 inline bool isRunning()
104 return state() == omni_thread::STATE_RUNNING;
117 omni_thread::join(NULL);
121 void* run_undetached(
void* x)
129 virtual void run(
void* arg)
137 std::shared_ptr<ThreadMaster> m;
142 template <
class ThreadMaster>
143 OmniThreadCreator<ThreadMaster>::OmniThreadCreator(
const std::shared_ptr<ThreadMaster>& _m, Action a,
bool undetach ):
153 template <
class ThreadMaster>
154 OmniThreadCreator<ThreadMaster>::OmniThreadCreator():
162 #endif // OmniThreadCreator_h_