summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency/notification.h
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
committerMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
commit589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch)
treec7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/util/concurrency/notification.h
parent3cba97198638df3750e3b455e2ad57af7ee536ae (diff)
downloadmongo-589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.tar.gz
SERVER-27938 Rename all OperationContext variables to opCtx
This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
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: