17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 11:34:19 +01:00

fix(app): the log written to the end of the closing, each step of it with its time; the Discord thread idle outside the driver mode

The log service stopped with applicationQuitOrder, so whatever was logged while the simulator closed was lost; it now runs until StopLogService() and writes out what came before. The closing logs each of its steps with the time since it began, to tell where a closing that hangs stops. Outside the driver mode the Discord thread spun a core in its loop, it now sleeps a second between the checks.
This commit is contained in:
maj00r
2026-11-03 21:45:57 +01:00
parent 823807201c
commit b34238f33f
4 changed files with 30 additions and 3 deletions

View File

@@ -290,9 +290,9 @@ int generate_nodebank_previews(int Argc, char *Argv[])
std::thread logservice(LogService);
auto const finish = [&](int const Result) {
// give the log service time to write out what's left
std::this_thread::sleep_for(std::chrono::milliseconds(200));
// the log service writes out what's left before it stops
Global.applicationQuitOrder = true;
StopLogService();
logservice.join();
return Result;
};