1
0
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:
Bartosz Taudul
2021-11-18 22:46:59 +01:00
parent 89ca010146
commit 902de497dc
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -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();
}