mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 16:14:58 +01:00
fix(physicslog): failed logs kept within 64 MB in all, cut outside the lock, never written twice; the writer knows itself when stopped
The lines kept while files can't be written are cut to their share of 64 MB before the lock the simulation waits on. A log written in part is cut back to its length, so the next try doesn't write its start twice. A stop from the writer itself is told by its id even after another thread took it to join, and the watchdog's flush waits at most its time, the writing on a thread of its own.
This commit is contained in:
@@ -23,7 +23,7 @@ the driver of its train. So the speed recorder's tape can be read from them as b
|
||||
simulator runs, without a log of every vehicle. Like those of `physicslog yes`, they are written every
|
||||
two seconds, each file opened only for the moment it is written to; a crash loses the last two seconds
|
||||
of real time of them (at a higher time speed, more of the simulated time). A file another program holds
|
||||
for a while doesn't lose its lines: they are written once it can be.
|
||||
for a while doesn't lose its lines: they are written once it can be, the last 64 MB of all such logs at most.
|
||||
|
||||
The recording starts once the scenery is loaded and ends when the simulator closes. Going into the
|
||||
editor (F11) ends it too, since the editor may take away the tracks and the vehicles it refers to; no
|
||||
|
||||
Reference in New Issue
Block a user