A failed write put its lines back, ahead of those since, so a file held by
another program for a while gets its header and every line once it can be
written; up to 4 MB kept per log. Stopping is joined once, and not from the
writer's own thread. main stops the logs after an error it caught too, and the
test watchdog flushes with a time limit, so a disk that doesn't answer doesn't
keep the run from ending.
"physicslog yes" kept the .dat of every vehicle with a driver open for the whole run and flushed it twenty
times a second from the simulation's thread: some 580 open files on Tomaszewo. The lines are kept now and a
thread of their own writes them every two seconds, each file opened only for the moment it is written to.
The files, their lines and their text mode stay as they were.
- The black box, with the physics logs off, writes the tapes of the user's vehicles through the same
writer as it goes, not at the end. A log begins when the user is first in the vehicle and goes on
while the user looks around outside, until another vehicle is taken; back in it, the log goes on after
the gap. The vehicle's own driver keeps the log only if it is the primary one, as a passive one's clock
stands still; otherwise the driver of its train does.
- What is kept is written when the simulator closes, after the black box, at the end of a test run, and
when the test watchdog ends a run. A crash loses the last two seconds.
- On Tomaszewo with the black box alone, the one tape grows every two seconds. With "physicslog yes", the
581 logs grow and the simulator holds as many handles as without them; writing them takes the thread
about 1.9 s, which the closing waits for once.