void StartThread(int priority)
void startWithPriority(int priority)
t_size getOptimalWorkerThreadCount()
bool IsThreadActive() const
PFC_CLASS_NOT_COPYABLE_EX(CSimpleThread)
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.
completion_notify_ptr create_task(unsigned p_id)
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
virtual unsigned ThreadProc(abort_callback &p_abort)=0
completion_notify_ptr m_ownNotify
bool IsThreadActive() const
abort_callback_impl m_abort