X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fthread.h;h=59e6e060ce4b77d2e0e69b45f245e6537ca3a70b;hb=a1d6fa071280123f282c1bac3b68008672401024;hp=92923f31bbd5718eb8816aed1e28d9e8e72dadda;hpb=b56eb5ec1da675da0c66abc53c1e4f6c4e4cccbd;p=libs%2Fcore.git diff --git a/source/core/thread.h b/source/core/thread.h index 92923f3..59e6e06 100644 --- a/source/core/thread.h +++ b/source/core/thread.h @@ -8,8 +8,6 @@ Distributed under the LGPL #ifndef MSP_CORE_THREAD_H_ #define MSP_CORE_THREAD_H_ -#include "types.h" - namespace Msp { /** @@ -22,33 +20,24 @@ is started. class Thread { private: - ThreadHandle thread_; - bool launched_; + struct Private; + + Private *priv_; + bool launched_; protected: - Thread(): launched_(false) { } + Thread(); +private: + Thread(const Thread &); + Thread &operator=(const Thread &); public: virtual ~Thread(); void join(); - void cancel(); void kill(); protected: void launch(); virtual void main() = 0; - void check_cancel(); - -private: - static -#ifdef WIN32 - DWORD WINAPI -#else - void * -#endif - main_(void *t) { (reinterpret_cast(t))->main(); return 0; } - - Thread(const Thread &); - Thread &operator=(const Thread &); }; } // namespace Msp