summaryrefslogtreecommitdiff
path: root/src/mongo/transport
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-10-31 16:02:44 +0000
committerevergreen <evergreen@mongodb.com>2019-10-31 16:02:44 +0000
commit3a05e4ce75cd03b09b52ec5943e1801c6d91279b (patch)
treeb4d892be3527e03c6ca73d4be182988bebccce02 /src/mongo/transport
parent5b60211d31ccb75c02348b346272f3cd387c1dc6 (diff)
downloadmongo-3a05e4ce75cd03b09b52ec5943e1801c6d91279b.tar.gz
SERVER-41357 SERVER-41360 SERVER-43324 Add Mutex, BasicLockableAdaptor, and DiagnosticInfo
This commit backports Mutex, BasicLockableAdaptor, and DiagnosticInfo to v4.2. These pieces came in completely in various interleaved commits. The constituent commits partially included in this backport are listed below. The majority of these commits are part of the "Improved Diagnostics for Latches" epic. Mutex: - SERVER-41357 - SERVER-41362 - SERVER-42893 - SERVER-42595 - SERVER-42165 - SERVER-42895 BasicLockableAdaptor: - SERVER-43324 - SERVER-43374 - SERVER-43800 DiagnosticInfo: - SERVER-41360 - SERVER-41362 - SERVER-41358 - SERVER-41364 - SERVER-42448 - SERVER-42363 - SERVER-42363 - SERVER-42492 - SERVER-42595 - SERVER-44086 Note that while this commit adds these pieces and integrates them into the mongo-server codebase, it does not convert existing stdx::mutex construction. It also does not include the updates to Interruptible that were done as part of "Improved Diagnostics for Latches".
Diffstat (limited to 'src/mongo/transport')
-rw-r--r--src/mongo/transport/baton_asio_linux.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/transport/baton_asio_linux.h b/src/mongo/transport/baton_asio_linux.h
index 3536bc16ab4..0db7fda5230 100644
--- a/src/mongo/transport/baton_asio_linux.h
+++ b/src/mongo/transport/baton_asio_linux.h
@@ -305,7 +305,8 @@ public:
// If we don't have a timeout, or we have a timeout that's unexpired, run poll.
if (!deadline || (*deadline > now)) {
if (deadline && !clkSource->tracksSystemClock()) {
- invariant(clkSource->setAlarm(*deadline, [this] { notify(); }));
+ invariant(clkSource->setAlarm(*deadline,
+ [this, anchor = shared_from_this()] { notify(); }));
deadline.reset();
}