#define MSP_CORE_THREAD_H_
#include <string>
+#include "noncopyable.h"
namespace Msp {
This is to allow initializing variables of the derived class before the thread
is started.
*/
-class Thread
+class Thread: private NonCopyable
{
private:
struct 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();