You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/09/09 06:32:36 UTC
svn commit: r1166996 - /thrift/trunk/lib/cpp/src/concurrency/Mutex.h
Author: jfarrell
Date: Fri Sep 9 04:32:36 2011
New Revision: 1166996
URL: http://svn.apache.org/viewvc?rev=1166996&view=rev
Log:
THRIFT-1333: Make RWGuard not copyable
Client: cpp
Patch: Dave Watson
Copying would cause contained mutex to unlock twice, changing to noncopyable.
Modified:
thrift/trunk/lib/cpp/src/concurrency/Mutex.h
Modified: thrift/trunk/lib/cpp/src/concurrency/Mutex.h
URL: http://svn.apache.org/viewvc/thrift/trunk/lib/cpp/src/concurrency/Mutex.h?rev=1166996&r1=1166995&r2=1166996&view=diff
==============================================================================
--- thrift/trunk/lib/cpp/src/concurrency/Mutex.h (original)
+++ thrift/trunk/lib/cpp/src/concurrency/Mutex.h Fri Sep 9 04:32:36 2011
@@ -138,7 +138,7 @@ enum RWGuardType {
};
-class RWGuard {
+class RWGuard : boost::noncopyable {
public:
RWGuard(const ReadWriteMutex& value, bool write = false)
: rw_mutex_(value) {