Author: dreiss
Date: Thu May 7 00:41:18 2009
New Revision: 772478
URL: http://svn.apache.org/viewvc?rev=772478&view=rev
Log:
THRIFT-490. Clarify the comment for the Guard macro
Modified:
incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h
Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h?rev=772478&r1=772477&r2=772478&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/Mutex.h Thu May 7 00:41:18
2009
@@ -102,6 +102,8 @@
// A little hack to prevent someone from trying to do "Guard(m);"
+// Such a use is invalid because the temporary Guard object is
+// destoryed at the end of the line, releasing the lock.
// Sorry for polluting the global namespace, but I think it's worth it.
#define Guard(m) incorrect_use_of_Guard(m)
#define RWGuard(m) incorrect_use_of_RWGuard(m)