mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 02:09:57 -04:00
Write the flight dump and the memory map through a temporary file and a rename.
The window's close ends the process under the detached threads, so a dump file the flight recorder's thread was writing stayed cut short under its own name. Its three files are now written as .part and renamed when complete (runtime/part_file.h, with a check that kills a writer in the middle), and the allocator's map goes through plat_file_write_cached. The shader identities and the other cache files already went through an atomic write. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -501,6 +501,14 @@ A change to what a host thread gives back when it ends (`runtime/platform/win32.
|
||||
sleep, read a file and end, half joined and half detached; the end hook runs once on each, and on Windows the process
|
||||
holds as many handles afterwards as before (each thread's sleep timer and read event are closed). No game files.
|
||||
|
||||
A file a detached thread writes piece by piece (the flight recorder's dump, `runtime/flight.c` `dump_main`) goes
|
||||
through `runtime/part_file.h`: it is written as `<name>.part` and renamed when complete, because the window's close
|
||||
ends the process under such a thread and a file cut short there would read as a whole one. A file made in memory
|
||||
first uses `plat_file_write_cached` or `plat_file_write_atomic`, which do the same in one call. A change to the
|
||||
helper passes `python tests\part_file_check.py`, which builds it with the platform layer: nothing stands under the
|
||||
name while a file is written, an older file stays until the new one is complete and after a write that was given up,
|
||||
and a writer killed in the middle leaves the older file whole and the half as `.part`. No game files.
|
||||
|
||||
A change to the log queue (`runtime/logq.c`) passes `python tests\logq_check.py`, which builds it with the platform
|
||||
layer and a destination of its own: 160,000 lines from eight threads arrive whole and in each thread's order, a line
|
||||
logged while the queue's lock is taken waits and does not pass the lines queued before it, a destination that takes
|
||||
|
||||
Reference in New Issue
Block a user