#ifndef BASE_THREAD_CLASS_H #define BASE_THREAD_CLASS_H #include #include #include "BaseEvent.h" class CBaseThread { public: CBaseThread(); virtual ~CBaseThread(); virtual int Run(); BOOL BeginThread(); void JoinThread(); public: void Shutdown(BOOL bWatiForShutdown = TRUE); public: virtual BOOL InitInstance(); virtual int ExitInstance(); protected: BOOL IsStopping(DWORD nTimeOut = 10); protected: pthread_t m_thread; CBaseEvent m_StopEvent; }; #endif