summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/proxyscope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/scripting/mozjs/proxyscope.cpp')
-rw-r--r--src/mongo/scripting/mozjs/proxyscope.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/scripting/mozjs/proxyscope.cpp b/src/mongo/scripting/mozjs/proxyscope.cpp
index fbe83f9ed83..fc3a38d0927 100644
--- a/src/mongo/scripting/mozjs/proxyscope.cpp
+++ b/src/mongo/scripting/mozjs/proxyscope.cpp
@@ -285,7 +285,7 @@ void MozJSProxyScope::runWithoutInterruptionExceptAtGlobalShutdown(Closure&& clo
}
void MozJSProxyScope::runOnImplThread(unique_function<void()> f) {
- stdx::unique_lock<stdx::mutex> lk(_mutex);
+ stdx::unique_lock<Latch> lk(_mutex);
_function = std::move(f);
invariant(_state == State::Idle);
@@ -322,7 +322,7 @@ void MozJSProxyScope::runOnImplThread(unique_function<void()> f) {
void MozJSProxyScope::shutdownThread() {
{
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
invariant(_state == State::Idle);
@@ -369,7 +369,7 @@ void MozJSProxyScope::implThread(void* arg) {
const auto unbindImplScope = makeGuard([&proxy] { proxy->_implScope = nullptr; });
while (true) {
- stdx::unique_lock<stdx::mutex> lk(proxy->_mutex);
+ stdx::unique_lock<Latch> lk(proxy->_mutex);
{
MONGO_IDLE_THREAD_BLOCK;
proxy->_implCondvar.wait(lk, [proxy] {