mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Allow forceful insertion into main thread queue.
This is useful to run some tasks outside of the main render job.
This commit is contained in:
@@ -130,9 +130,9 @@ static uint32_t updateVersion = 0;
|
||||
static bool showReleaseNotes = false;
|
||||
static std::string releaseNotes;
|
||||
|
||||
void RunOnMainThread( std::function<void()> cb )
|
||||
void RunOnMainThread( std::function<void()> cb, bool forceDelay = false )
|
||||
{
|
||||
if( std::this_thread::get_id() == mainThread )
|
||||
if( !forceDelay && std::this_thread::get_id() == mainThread )
|
||||
{
|
||||
cb();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user