diff options
Diffstat (limited to 'src/mongo/db/concurrency/lock_state.cpp')
-rw-r--r-- | src/mongo/db/concurrency/lock_state.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp index fd840437c89..5f5171e6129 100644 --- a/src/mongo/db/concurrency/lock_state.cpp +++ b/src/mongo/db/concurrency/lock_state.cpp @@ -220,7 +220,7 @@ void CondVarLockGrantNotification::clear() { } LockResult CondVarLockGrantNotification::wait(Milliseconds timeout) { - stdx::unique_lock<stdx::mutex> lock(_mutex); + stdx::unique_lock<Latch> lock(_mutex); return _cond.wait_for( lock, timeout.toSystemDuration(), [this] { return _result != LOCK_INVALID; }) ? _result @@ -229,7 +229,7 @@ LockResult CondVarLockGrantNotification::wait(Milliseconds timeout) { LockResult CondVarLockGrantNotification::wait(OperationContext* opCtx, Milliseconds timeout) { invariant(opCtx); - stdx::unique_lock<stdx::mutex> lock(_mutex); + stdx::unique_lock<Latch> lock(_mutex); if (opCtx->waitForConditionOrInterruptFor( _cond, lock, timeout, [this] { return _result != LOCK_INVALID; })) { // Because waitForConditionOrInterruptFor evaluates the predicate before checking for @@ -243,7 +243,7 @@ LockResult CondVarLockGrantNotification::wait(OperationContext* opCtx, Milliseco } void CondVarLockGrantNotification::notify(ResourceId resId, LockResult result) { - stdx::unique_lock<stdx::mutex> lock(_mutex); + stdx::unique_lock<Latch> lock(_mutex); invariant(_result == LOCK_INVALID); _result = result; |