THRIFT-1333: Make RWGuard not copyable
authorJake Farrell <jfarrell@apache.org>
Fri, 9 Sep 2011 04:32:36 +0000 (04:32 +0000)
committerJake Farrell <jfarrell@apache.org>
Fri, 9 Sep 2011 04:32:36 +0000 (04:32 +0000)
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

index 3267c73..4b1c3bf 100644 (file)
@@ -138,7 +138,7 @@ enum RWGuardType {
 };
 
 
-class RWGuard {
+class RWGuard : boost::noncopyable {
   public:
     RWGuard(const ReadWriteMutex& value, bool write = false)
          : rw_mutex_(value) {