X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fthread.h;h=c84fb668a7c494ca47fa965e46ceb587866a0162;hb=122846f0881673770d88eff7d925ecf25c01b62e;hp=7cf17b8d327ed3e84075bb4c247f4c5d16c4ff6f;hpb=1a563cfd722a5571428562259790b4948980dd4f;p=libs%2Fcore.git diff --git a/source/core/thread.h b/source/core/thread.h index 7cf17b8..c84fb66 100644 --- a/source/core/thread.h +++ b/source/core/thread.h @@ -2,6 +2,7 @@ #define MSP_CORE_THREAD_H_ #include +#include "noncopyable.h" namespace Msp { @@ -12,7 +13,7 @@ automatically started upon creation - you must manually call launch() instead. This is to allow initializing variables of the derived class before the thread is started. */ -class Thread +class Thread: private NonCopyable { private: struct Private; @@ -26,15 +27,12 @@ private: JOINED }; - Private *priv_; + Private *priv_ = 0; std::string name_; - State state_; + State state_ = PENDING; protected: Thread(const std::string & = std::string()); -private: - Thread(const Thread &); - Thread &operator=(const Thread &); public: virtual ~Thread();