From b56b51fcafabc678e90474871cd282450949152a Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Fri, 17 Nov 2017 13:43:51 -0700 Subject: [PATCH] utility: Disabled copy ctors in thread classes --- Source/cm_thread.hxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx index b8c25c7e69..ec5fe1d8fe 100644 --- a/Source/cm_thread.hxx +++ b/Source/cm_thread.hxx @@ -9,6 +9,7 @@ namespace cm { class mutex { + CM_DISABLE_COPY(mutex) uv_mutex_t _M_; public: @@ -24,6 +25,7 @@ template class lock_guard { T& _mutex; + CM_DISABLE_COPY(lock_guard) public: lock_guard(T& m) @@ -37,6 +39,7 @@ public: class shared_mutex { uv_rwlock_t _M_; + CM_DISABLE_COPY(shared_mutex) public: shared_mutex() { uv_rwlock_init(&_M_); } @@ -55,6 +58,7 @@ template class shared_lock { T& _mutex; + CM_DISABLE_COPY(shared_lock) public: shared_lock(T& m) @@ -68,6 +72,8 @@ public: template class unique_lock : public lock_guard { + CM_DISABLE_COPY(unique_lock) + public: unique_lock(T& m) : lock_guard(m)