mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
Fix closing threads
This commit is contained in:
@@ -581,8 +581,19 @@ eu07_application::run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Global.applicationQuitOrder = true;
|
Global.applicationQuitOrder = true;
|
||||||
Global.threads["DiscordRPC"].join(); // wait for DiscordRPC thread to finish
|
auto it = Global.threads.find("LogService");
|
||||||
Global.threads["LogService"].join(); // wait for logging thread to finish
|
if (it != Global.threads.end())
|
||||||
|
{
|
||||||
|
if (it->second.joinable())
|
||||||
|
it->second.join();
|
||||||
|
}
|
||||||
|
|
||||||
|
it = Global.threads.find("DiscordRPC");
|
||||||
|
if (it != Global.threads.end())
|
||||||
|
{
|
||||||
|
if (it->second.joinable())
|
||||||
|
it->second.join();
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user