18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 22:04:59 +01:00

fix(physicslog): the writer's destructor throws nothing, its wait a plain condition variable woken to stop; a driver of no vehicle controls nothing

This commit is contained in:
maj00r
2026-11-16 02:08:04 +01:00
parent b421550cbe
commit 94b7c7f01b
3 changed files with 14 additions and 3 deletions

View File

@@ -63,7 +63,7 @@ private:
std::mutex m_mutex; // the lines kept and the thread
std::map<std::string, pending> m_pending;
bool m_stopped{false};
std::condition_variable_any m_wake;
std::condition_variable m_wake;
std::jthread m_thread;
std::thread::id m_writer; // of the thread, kept after it is taken to be joined: the writer knows itself by it
std::mutex m_filemutex; // the files are written one batch at a time, so the lines of a log stay in order