39 m_ownNotify = create_task(0);
79 if (!m_abort.is_aborting()) m_ownNotify->on_completion_async(code);
void StartThread(int priority)
void startWithPriority(int priority)
t_size getOptimalWorkerThreadCount()
bool IsThreadActive() const
void WaitTillThreadDone()
void StartThread(int priority)
void WaitTillThreadDone()
IMPORTANT: all classes derived from thread must call waitTillDone() in their destructor, to avoid object destruction during a virtual function call!
virtual void ThreadDone(unsigned p_code)
Called when the thread has completed normally, with p_code equal to ThreadProc retval. Not called when AbortThread() or WaitTillThreadDone() was used to abort the thread / wait for the thread to finish.
Helper base class for classes that manage nonblocking tasks and get notified back thru completion_not...
IMPORTANT: all classes derived from CSimpleThread must call AbortThread()/WaitTillThreadDone() in the...
static int currentPriority()
static t_size GetOptimalWorkerThreadCount()
IMPORTANT: all classes derived from CVerySimpleThread must call WaitTillThreadDone() in their destruc...
void on_task_completion(unsigned p_id, unsigned p_status)
virtual void ThreadProc()=0
completion_notify_ptr m_ownNotify
bool IsThreadActive() const
abort_callback_impl m_abort