1 #ifndef _pthread_thread_
\r
2 #define _pthread_thread_
\r
4 #include "noncopyable.h"
\r
5 #include "runnable.h"
\r
13 class Thread:public NonCopyable
\r
17 Thread(Runnable *runnable);
\r
23 void Sleep(const long ms);
\r
24 const bool IsCancelled() { return m_cancelled; }
\r
25 const bool IsRunning() { return m_running; }
\r
29 static void *EntryPoint(void *pthis);
\r
32 bool m_running; // thread (object) is currently running
\r
34 Runnable *m_runnable; // actual object that is being run
\r
40 #endif // _pthread_thread_
\r