docs: the SWMR follow loop stops for a writer that died, not only one that closed
The README example looped while swmr_writer_active(), which never ends when the writer crashed or was killed: libhdf5 clears the SWMR-write flag only on close (the mid-write fixture keeps it set for good). The loop now also stops after a minute without growth, and the README, the swmr_writer_active docs (with the same loop as a compiled no_run doctest) and the design say why. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
@@ -121,6 +121,9 @@ writer keeps appending. What the format and the library guarantee:
|
||||
the index entry, only appends), as for libhdf5's reader.
|
||||
5. **Writer state.** `File::swmr_writer_active()` reads the superblock
|
||||
flags again, so a reader can tell when the writer has closed the file.
|
||||
A writer that crashed or was killed never clears the flag, so a reader
|
||||
that follows a file needs a second stop condition (the README example
|
||||
stops after a minute without growth).
|
||||
|
||||
What stays out: SWMR writing, VFD SWMR (HDF5 1.13's page-buffer protocol,
|
||||
not in 1.14 or 2.0), remote SWMR, refresh of groups/attributes (a SWMR
|
||||
|
||||
Reference in New Issue
Block a user