Fix race condition in VS on thread naming.

This commit is contained in:
Ben Vanik 2015-05-19 22:27:35 -07:00
parent 2328b34308
commit 20a3172ebb
1 changed files with 1 additions and 0 deletions

View File

@ -287,6 +287,7 @@ X_STATUS XThread::Exit(int exit_code) {
static uint32_t __stdcall XThreadStartCallbackWin32(void* param) { static uint32_t __stdcall XThreadStartCallbackWin32(void* param) {
XThread* thread = reinterpret_cast<XThread*>(param); XThread* thread = reinterpret_cast<XThread*>(param);
thread->set_name(thread->name());
xe::Profiler::ThreadEnter(thread->name().c_str()); xe::Profiler::ThreadEnter(thread->name().c_str());
current_thread_tls = thread; current_thread_tls = thread;
thread->Execute(); thread->Execute();