From 2e9f5105b8c12ba59d6494963ec9ce389558a6f3 Mon Sep 17 00:00:00 2001 From: Jake Farrell Date: Fri, 9 Sep 2011 04:32:36 +0000 Subject: [PATCH] THRIFT-1333: Make RWGuard not copyable Client: cpp Patch: Dave Watson Copying would cause contained mutex to unlock twice, changing to noncopyable. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1166996 13f79535-47bb-0310-9956-ffa450edef68 --- lib/cpp/src/concurrency/Mutex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cpp/src/concurrency/Mutex.h b/lib/cpp/src/concurrency/Mutex.h index 3267c73b..4b1c3bf1 100644 --- a/lib/cpp/src/concurrency/Mutex.h +++ b/lib/cpp/src/concurrency/Mutex.h @@ -138,7 +138,7 @@ enum RWGuardType { }; -class RWGuard { +class RWGuard : boost::noncopyable { public: RWGuard(const ReadWriteMutex& value, bool write = false) : rw_mutex_(value) { -- 2.17.1