Skip to content

Commit

Permalink
THRIFT-1333: Make RWGuard not copyable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jfarrell committed Sep 9, 2011
1 parent 4013fa3 commit 2e9f510
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cpp/src/concurrency/Mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ enum RWGuardType {
};


class RWGuard {
class RWGuard : boost::noncopyable {
public:
RWGuard(const ReadWriteMutex& value, bool write = false)
: rw_mutex_(value) {
Expand Down

0 comments on commit 2e9f510

Please sign in to comment.