Skip to content

Commit 1958502

Browse files
Update README: Editor write-back is now best-effort atomic
1 parent 11af75f commit 1958502

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,10 @@ All yamltrip errors inherit from `YAMLTripError`:
110110
(`doc.has_anchors()`) but not resolved during value extraction.
111111
- **Large integers may lose precision.** YAML integers outside the signed
112112
64-bit range (i64) may become `float` during deserialization.
113-
- **Editor write-back is not atomic.** `Editor` detects external file changes
114-
between enter and exit, but the check-then-write is racy. Do not use it
115-
with concurrent writers.
113+
- **Editor write-back is best-effort atomic.** `Editor` writes to a
114+
temporary file then does an `os.replace`, so the target file is never
115+
left half-written. External modifications between enter and exit are
116+
detected, but the check is not locked against concurrent writers.
116117

117118
## Design Decisions
118119

0 commit comments

Comments
 (0)