THRIFT-490. Clarify the comment for the Guard macro
authorDavid Reiss <dreiss@apache.org>
Thu, 7 May 2009 00:41:18 +0000 (00:41 +0000)
committerDavid Reiss <dreiss@apache.org>
Thu, 7 May 2009 00:41:18 +0000 (00:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@772478 13f79535-47bb-0310-9956-ffa450edef68

lib/cpp/src/concurrency/Mutex.h

index 884412b..73c73e0 100644 (file)
@@ -102,6 +102,8 @@ class RWGuard {
 
 
 // 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)