1
0
forked from mirrors/0ad

Make the TaskManager a automatic livetime object

This way the destructor can be used for cleanup.
This commit is contained in:
phosit
2024-09-18 18:40:21 +02:00
committed by phosit
parent 256152df6d
commit 31d9b0ed05
8 changed files with 44 additions and 72 deletions
+1 -3
View File
@@ -576,7 +576,7 @@ static void RunGameOrAtlas(const PS::span<const char* const> argv)
CXeromycesEngine xeromycesEngine;
// Initialise the global task manager at this point (JS & Profiler2 are set up).
Threading::TaskManager::Initialise();
Threading::TaskManager taskManager;
if (ATLAS_RunIfOnCmdLine(args, false))
return;
@@ -719,8 +719,6 @@ static void RunGameOrAtlas(const PS::span<const char* const> argv)
if (g_Shutdown == ShutdownType::RestartAsAtlas)
ATLAS_RunIfOnCmdLine(args, true);
#endif
Threading::TaskManager::Instance().ClearQueue();
}
#if OS_ANDROID