]> git.tdb.fi Git - libs/core.git/blobdiff - source/core/thread.h
Drop copyright and license notices from source files
[libs/core.git] / source / core / thread.h
index 8d323b328441896a6c3a928ec51fc560ed84847b..ac7169ff0250c509260f7303834d34fb7fb83155 100644 (file)
@@ -1,15 +1,6 @@
-/* $Id$
-
-This file is part of libmspcore
-Copyright © 2006 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_CORE_THREAD_H_
 #define MSP_CORE_THREAD_H_
 
-#include "types.h"
-
 namespace Msp {
 
 /**
@@ -22,33 +13,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<Thread *>(t))->main(); return 0; }
-
-       Thread(const Thread &);
-       Thread &operator=(const Thread &);
+       virtual void main() = 0;
 };
 
 } // namespace Msp