summaryrefslogtreecommitdiff
path: root/src/mongo/db/client.cpp
diff options
context:
space:
mode:
authorRandolph Tan <randolph@mongodb.com>2019-09-13 18:46:46 +0000
committerevergreen <evergreen@mongodb.com>2019-09-13 18:46:46 +0000
commitc4467548514ff07721f4de215b3b74d1111ee9d1 (patch)
tree8441af03d79e894ff41e1f93b265c0eb7fd661fe /src/mongo/db/client.cpp
parent707ee6aa025936c5566625cc1b23cf2ffc6de9dc (diff)
downloadmongo-c4467548514ff07721f4de215b3b74d1111ee9d1.tar.gz
SERVER-43174 Make migration destination threads killable
Diffstat (limited to 'src/mongo/db/client.cpp')
-rw-r--r--src/mongo/db/client.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/client.cpp b/src/mongo/db/client.cpp
index 456e0b0c98d..3bac054c2b1 100644
--- a/src/mongo/db/client.cpp
+++ b/src/mongo/db/client.cpp
@@ -81,6 +81,13 @@ void Client::initThread(StringData desc,
currentClient = service->makeClient(fullDesc, std::move(session));
}
+void Client::initKillableThread(StringData desc, ServiceContext* service) {
+ initThread(desc, service, nullptr);
+
+ stdx::lock_guard lk(*currentClient);
+ currentClient->setSystemOperationKillable(lk);
+}
+
namespace {
int64_t generateSeed(const std::string& desc) {
size_t seed = 0;