-
- class CThread
- {
- public:
- CThread(void);
- virtual ~CThread(void);
-
- virtual bool IsRunning(void) const { return m_bRunning; }
- virtual bool CreateThread(bool bWait = true);
- virtual bool StopThread(bool bWaitForExit = true);
- virtual bool IsStopped(void) const { return m_bStop; };
- virtual bool Sleep(uint32_t iTimeout);
-
- static void *ThreadHandler(CThread *thread);
- virtual void *Process(void) = 0;
-
- protected:
- CCondition m_threadCondition;
-
- private:
- pthread_t m_thread;
- CMutex m_threadMutex;
- bool m_bStop;
- bool m_bRunning;
- };