1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Sleep to force rescheduling main thread during init.

This fixes problems with first context switch data region possibly not being
available for the main thread, if no rescheduling was performed after sys
tracing has started.
This commit is contained in:
Bartosz Taudul 2020-04-14 22:43:23 +02:00
parent db9557fc84
commit a5bff2f7e5

View File

@ -1091,6 +1091,7 @@ Profiler::Profiler()
{ {
s_sysTraceThread = (Thread*)tracy_malloc( sizeof( Thread ) ); s_sysTraceThread = (Thread*)tracy_malloc( sizeof( Thread ) );
new(s_sysTraceThread) Thread( SysTraceWorker, nullptr ); new(s_sysTraceThread) Thread( SysTraceWorker, nullptr );
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
} }
#endif #endif