summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Myers <nathan.myers@10gen.com>2017-09-25 16:34:56 -0400
committerNathan Myers <nathan.myers@10gen.com>2017-09-25 16:35:41 -0400
commit60c35fd35f5d1d9d3c2b11d56ee46e95e8a94c04 (patch)
treedc80de7436260a88808d171e6702457a2a18f20b
parent44d011a20109ef8769d881306e33bc92a2b44f4d (diff)
downloadmongo-60c35fd35f5d1d9d3c2b11d56ee46e95e8a94c04.tar.gz
SERVER-31144 Document WithLock::withoutLock right.
-rw-r--r--src/mongo/util/concurrency/with_lock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/util/concurrency/with_lock.h b/src/mongo/util/concurrency/with_lock.h
index 5f6cf3a15f1..e1607e361cf 100644
--- a/src/mongo/util/concurrency/with_lock.h
+++ b/src/mongo/util/concurrency/with_lock.h
@@ -91,7 +91,8 @@ struct WithLock {
WithLock(stdx::unique_lock<Mutex>&&) = delete;
/*
- * Pass the result of withoutLock() when a lock is not really needed, such as in a constructor.
+ * Produces a WithLock without benefit of any actual lock, for use in cases where a lock is not
+ * really needed, such as in many (but not all!) constructors.
*/
static WithLock withoutLock() noexcept {
return {};