summaryrefslogtreecommitdiffstats
path: root/src/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Thread.cpp')
-rw-r--r--src/Thread.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp
index e35d347..a2d79c3 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -79,6 +79,7 @@ Thread::create_for_this_thread(const std::string& name)
Thread&
Thread::get()
{
+ pthread_once(&s_thread_key_once, thread_key_alloc);
Thread* this_thread = reinterpret_cast<Thread*>(
pthread_getspecific(s_thread_key));
if (!this_thread)