mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08: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:
@@ -1091,6 +1091,7 @@ Profiler::Profiler()
|
||||
{
|
||||
s_sysTraceThread = (Thread*)tracy_malloc( sizeof( Thread ) );
|
||||
new(s_sysTraceThread) Thread( SysTraceWorker, nullptr );
|
||||
std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user