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/scripting/engine.cpp | |
parent | 45aea2495306dd61fab46bd398735bb6aaf7b53a (diff) | |
download | mongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz |
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/scripting/engine.cpp')
-rw-r--r-- | src/mongo/scripting/engine.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp index b5093581889..67edb2ca277 100644 --- a/src/mongo/scripting/engine.cpp +++ b/src/mongo/scripting/engine.cpp @@ -332,7 +332,7 @@ namespace { class ScopeCache { public: void release(const string& poolName, const std::shared_ptr<Scope>& scope) { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); if (scope->hasOutOfMemoryException()) { // make some room @@ -358,7 +358,7 @@ public: } std::shared_ptr<Scope> tryAcquire(OperationContext* opCtx, const string& poolName) { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); for (Pools::iterator it = _pools.begin(); it != _pools.end(); ++it) { if (it->poolName == poolName) { @@ -374,7 +374,7 @@ public: } void clear() { - stdx::lock_guard<stdx::mutex> lk(_mutex); + stdx::lock_guard<Latch> lk(_mutex); _pools.clear(); } @@ -391,7 +391,7 @@ private: typedef std::deque<ScopeAndPool> Pools; // More-recently used Scopes are kept at the front. Pools _pools; // protected by _mutex - stdx::mutex _mutex; + Mutex _mutex = MONGO_MAKE_LATCH("ScopeCache::_mutex"); }; ScopeCache scopeCache; |