diff options
author | Ben Caimano <ben.caimano@10gen.com> | 2020-11-12 19:13:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-12-03 20:34:08 +0000 |
commit | b0f7369dfb3bd61db0cf08c4f2373788fbf01a67 (patch) | |
tree | 78806650721981bd46bcd21257128c90badbf78a /src/mongo/util/thread_context.h | |
parent | ab78fd25adaea0603cf9497c1acc0d88cb739b84 (diff) | |
download | mongo-b0f7369dfb3bd61db0cf08c4f2373788fbf01a67.tar.gz |
SERVER-52821 Allow thread names to be cached by unique id
Diffstat (limited to 'src/mongo/util/thread_context.h')
-rw-r--r-- | src/mongo/util/thread_context.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/util/thread_context.h b/src/mongo/util/thread_context.h index 7c4b9bbfbc8..e839b947a97 100644 --- a/src/mongo/util/thread_context.h +++ b/src/mongo/util/thread_context.h @@ -29,9 +29,10 @@ #pragma once +#include "mongo/platform/basic.h" + #include "mongo/platform/atomic_word.h" #include "mongo/platform/process_id.h" -#include "mongo/util/assert_util.h" #include "mongo/util/decorable.h" #include "mongo/util/intrusive_counter.h" @@ -115,7 +116,7 @@ private: boost::intrusive_ptr<ThreadContext> instance; }; - inline static thread_local auto _handle = Handle{}; + static thread_local Handle _handle; const ProcessId _threadId = ProcessId::getCurrentThreadId(); AtomicWord<bool> _isAlive{true}; |