mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
Wait for log mutex to init
This commit is contained in:
12
Logs.cpp
12
Logs.cpp
@@ -79,6 +79,18 @@ std::mutex logMutex;
|
|||||||
|
|
||||||
void LogService()
|
void LogService()
|
||||||
{
|
{
|
||||||
|
// prevent crash if mutex is not initialized
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
logMutex.lock();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch (...) {}
|
||||||
|
}
|
||||||
|
logMutex.unlock();
|
||||||
|
|
||||||
while (!Global.applicationQuitOrder)
|
while (!Global.applicationQuitOrder)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user