diff options
author | Brad King <brad.king@kitware.com> | 2017-11-30 15:57:43 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-30 15:57:52 (GMT) |
commit | 92b212e87542552a8dd095608098609a3ebe1d6d (patch) | |
tree | 16787e74a21534590493b7237271aeba2443b27d /Source/cm_thread.hxx | |
parent | c2ea729c87cee2fb19d34090ef00e42d12fb59f2 (diff) | |
parent | 1e9b7d3ceb882d3feb59324b6e55d40cc795576b (diff) | |
download | CMake-92b212e87542552a8dd095608098609a3ebe1d6d.zip CMake-92b212e87542552a8dd095608098609a3ebe1d6d.tar.gz CMake-92b212e87542552a8dd095608098609a3ebe1d6d.tar.bz2 |
Merge topic 'libuv-raii'
1e9b7d3c server: Switched to a auto model for handles
f43b9219 tests: Added tests to verify UV RAII semantics/constructs
a3abb85c Add RAII handles for libuv handle types
90f8db26 tests: unconditionally enabled server tests
b56b51fc utility: Disabled copy ctors in thread classes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1453
Diffstat (limited to 'Source/cm_thread.hxx')
-rw-r--r-- | Source/cm_thread.hxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cm_thread.hxx b/Source/cm_thread.hxx index b8c25c7..ec5fe1d 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 <typename T> 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 <typename T> class shared_lock { T& _mutex; + CM_DISABLE_COPY(shared_lock) public: shared_lock(T& m) @@ -68,6 +72,8 @@ public: template <typename T> class unique_lock : public lock_guard<T> { + CM_DISABLE_COPY(unique_lock) + public: unique_lock(T& m) : lock_guard<T>(m) |