summaryrefslogtreecommitdiff
path: root/src/mongo/transport/service_entry_point_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/transport/service_entry_point_utils.cpp')
-rw-r--r--src/mongo/transport/service_entry_point_utils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/transport/service_entry_point_utils.cpp b/src/mongo/transport/service_entry_point_utils.cpp
index f4e894e1168..aab92e246c3 100644
--- a/src/mongo/transport/service_entry_point_utils.cpp
+++ b/src/mongo/transport/service_entry_point_utils.cpp
@@ -40,6 +40,7 @@
#include "mongo/stdx/thread.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/debug_util.h"
+#include "mongo/util/thread_safety_context.h"
#if !defined(_WIN32)
#include <sys/resource.h>
@@ -101,6 +102,7 @@ Status launchServiceWorkerThread(std::function<void()> task) {
pthread_t thread;
auto ctx = std::make_unique<std::function<void()>>(std::move(task));
+ ThreadSafetyContext::getThreadSafetyContext()->onThreadCreate();
int failed = pthread_create(&thread, &attrs, runFunc, ctx.get());
pthread_attr_destroy(&attrs);