summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-01-19 16:24:05 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-01-24 13:45:53 -0500
commitbc433b50e0205dfd0a8bfb6906393d841fd8193a (patch)
tree969334ca08f56dd05254f4aa10b69d74dc080e65 /src/mongo/util/concurrency
parentfbf03e93dad1d2d081944c05436e777380873eb2 (diff)
downloadmongo-bc433b50e0205dfd0a8bfb6906393d841fd8193a.tar.gz
SERVER-28670 Add sharding CatalogCache and donor metrics to serverStatus
Includes metrics for refresh, clone and migration critical section duration.
Diffstat (limited to 'src/mongo/util/concurrency')
-rw-r--r--src/mongo/util/concurrency/notification.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/util/concurrency/notification.h b/src/mongo/util/concurrency/notification.h
index aa8df252110..322138f4b9e 100644
--- a/src/mongo/util/concurrency/notification.h
+++ b/src/mongo/util/concurrency/notification.h
@@ -97,8 +97,10 @@ public:
}
/**
- * If the notification is not set, blocks either until it becomes set or until the waitTimeout
- * expires. If the wait is interrupted, throws an exception. Otherwise, returns immediately.
+ * If the notification is set, returns immediately. Otherwise, blocks until it either becomes
+ * set or the waitTimeout expires, whichever comes first. Returns true if the notification is
+ * set (in which case a subsequent call to get is guaranteed to not block) or false otherwise.
+ * If the wait is interrupted, throws an exception.
*/
bool waitFor(OperationContext* opCtx, Milliseconds waitTimeout) {
stdx::unique_lock<stdx::mutex> lock(_mutex);