diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-08-05 17:47:33 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:59:19 +0300 |
commit | ab22f4cfaed6acb8e1578e92501fcc36e477b361 (patch) | |
tree | 3d73de2d1cb9788a2c32faa6fe45e2e06ac89f1b /base/thread.hpp | |
parent | 383627e23c4eb5178513376e48113d6d6e9a048f (diff) |
Fixed notes
Diffstat (limited to 'base/thread.hpp')
-rw-r--r-- | base/thread.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/base/thread.hpp b/base/thread.hpp index 2ec7b8b835..ab4b598064 100644 --- a/base/thread.hpp +++ b/base/thread.hpp @@ -40,7 +40,10 @@ class Thread thread m_thread; shared_ptr<IRoutine> m_routine; + DISALLOW_COPY(Thread); + public: + Thread(); ~Thread(); /// Run thread immediately. @@ -96,7 +99,7 @@ typedef thread::id ThreadID; ThreadID GetCurrentThreadID(); -/// A wrapper around a std thread which executes callable object in android envorinment +/// A wrapper around a std thread which executes callable object in thread which is attached to JVM /// Class has the same interface as std::thread class SimpleThread { @@ -120,9 +123,6 @@ public: return *this; } - SimpleThread(const SimpleThread &) = delete; - SimpleThread & operator= (const SimpleThread &) = delete; - void detach() { m_thread.detach(); } id get_id() const noexcept { return m_thread.get_id(); } void join() { m_thread.join(); } @@ -133,6 +133,8 @@ public: private: static void ThreadFunc(function<void()> fn); + DISALLOW_COPY(SimpleThread); + thread m_thread; }; } // namespace threads |