summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency/notification.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/concurrency/notification.h')
-rw-r--r--src/mongo/util/concurrency/notification.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/util/concurrency/notification.h b/src/mongo/util/concurrency/notification.h
index 32ce9caa068..091dca02a60 100644
--- a/src/mongo/util/concurrency/notification.h
+++ b/src/mongo/util/concurrency/notification.h
@@ -66,9 +66,9 @@ public:
* If the notification has been set, returns immediately. Otherwise blocks until it becomes set.
* If the wait is interrupted, throws an exception.
*/
- T& get(OperationContext* txn) {
+ T& get(OperationContext* opCtx) {
stdx::unique_lock<stdx::mutex> lock(_mutex);
- txn->waitForConditionOrInterrupt(_condVar, lock, [this]() -> bool { return !!_value; });
+ opCtx->waitForConditionOrInterrupt(_condVar, lock, [this]() -> bool { return !!_value; });
return _value.get();
}
@@ -100,7 +100,7 @@ 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.
*/
- bool waitFor(OperationContext* txn, Microseconds waitTimeout) {
+ bool waitFor(OperationContext* opCtx, Microseconds waitTimeout) {
const auto waitDeadline = Date_t::now() + waitTimeout;
stdx::unique_lock<stdx::mutex> lock(_mutex);
@@ -123,8 +123,8 @@ public:
return _notification.operator bool();
}
- void get(OperationContext* txn) {
- _notification.get(txn);
+ void get(OperationContext* opCtx) {
+ _notification.get(opCtx);
}
void get() {
@@ -135,8 +135,8 @@ public:
_notification.set(true);
}
- bool waitFor(OperationContext* txn, Microseconds waitTimeout) {
- return _notification.waitFor(txn, waitTimeout);
+ bool waitFor(OperationContext* opCtx, Microseconds waitTimeout) {
+ return _notification.waitFor(opCtx, waitTimeout);
}
private: