summaryrefslogtreecommitdiff
path: root/src/mongo/db/default_baton.cpp
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-09-17 23:22:19 +0000
committerevergreen <evergreen@mongodb.com>2019-09-17 23:22:19 +0000
commitbc11369435ca51e2ff6897433d00f6b909f6a25f (patch)
tree251653ec8285d798b41846e343e7e414e80ff277 /src/mongo/db/default_baton.cpp
parent45aea2495306dd61fab46bd398735bb6aaf7b53a (diff)
downloadmongo-bc11369435ca51e2ff6897433d00f6b909f6a25f.tar.gz
SERVER-42165 Replace uses of stdx::mutex with mongo::Mutex
Diffstat (limited to 'src/mongo/db/default_baton.cpp')
-rw-r--r--src/mongo/db/default_baton.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/default_baton.cpp b/src/mongo/db/default_baton.cpp
index 8ae455226cf..cd9332cb92e 100644
--- a/src/mongo/db/default_baton.cpp
+++ b/src/mongo/db/default_baton.cpp
@@ -61,7 +61,7 @@ void DefaultBaton::detachImpl() noexcept {
decltype(_scheduled) scheduled;
{
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
invariant(_opCtx->getBaton().get() == this);
_opCtx->setBaton(nullptr);
@@ -79,7 +79,7 @@ void DefaultBaton::detachImpl() noexcept {
}
void DefaultBaton::schedule(Task func) noexcept {
- stdx::unique_lock<stdx::mutex> lk(_mutex);
+ stdx::unique_lock<Latch> lk(_mutex);
if (!_opCtx) {
lk.unlock();
@@ -97,14 +97,14 @@ void DefaultBaton::schedule(Task func) noexcept {
}
void DefaultBaton::notify() noexcept {
- stdx::lock_guard<stdx::mutex> lk(_mutex);
+ stdx::lock_guard<Latch> lk(_mutex);
_notified = true;
_cv.notify_one();
}
Waitable::TimeoutState DefaultBaton::run_until(ClockSource* clkSource,
Date_t oldDeadline) noexcept {
- stdx::unique_lock<stdx::mutex> lk(_mutex);
+ stdx::unique_lock<Latch> lk(_mutex);
// We'll fulfill promises and run jobs on the way out, ensuring we don't hold any locks
const auto guard = makeGuard([&] {