diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-09-17 23:22:19 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-17 23:22:19 +0000 |
commit | bc11369435ca51e2ff6897433d00f6b909f6a25f (patch) | |
tree | 251653ec8285d798b41846e343e7e414e80ff277 /src/mongo/db/commands/validate.cpp | |
parent | 45aea2495306dd61fab46bd398735bb6aaf7b53a (diff) | |
download | mongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/db/commands/validate.cpp')
-rw-r--r-- | src/mongo/db/commands/validate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/commands/validate.cpp b/src/mongo/db/commands/validate.cpp index f90a3ace4fe..482baff8b74 100644 --- a/src/mongo/db/commands/validate.cpp +++ b/src/mongo/db/commands/validate.cpp @@ -50,7 +50,7 @@ MONGO_FAIL_POINT_DEFINE(validateCmdCollectionNotValid); namespace { // Protects the state below. -stdx::mutex _validationMutex; +Mutex _validationMutex; // Holds the set of full `databaseName.collectionName` namespace strings in progress. Validation // commands register themselves in this data structure so that subsequent commands on the same @@ -140,7 +140,7 @@ public: // Only one validation per collection can be in progress, the rest wait. { - stdx::unique_lock<stdx::mutex> lock(_validationMutex); + stdx::unique_lock<Latch> lock(_validationMutex); try { while (_validationsInProgress.find(nss.ns()) != _validationsInProgress.end()) { opCtx->waitForConditionOrInterrupt(_validationNotifier, lock); @@ -157,7 +157,7 @@ public: } ON_BLOCK_EXIT([&] { - stdx::lock_guard<stdx::mutex> lock(_validationMutex); + stdx::lock_guard<Latch> lock(_validationMutex); _validationsInProgress.erase(nss.ns()); _validationNotifier.notify_all(); }); |