Results for “atomic write”
Small, practical examples. Search by task or narrow things down below.
Undo a multi-row transfer atomically
Postgres: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
Postgres✓ Tested
Undo a multi-row transfer atomically
SQLite: The first transaction commits the fixtures. Rolling back the second transaction restores both sides of the attempted transfer.
SQLite✓ Tested
Update a shared counter atomically
Java: AtomicInteger provides an indivisible increment operation for a shared counter.
Java✓ Tested
Update an atomic counter
Update an atomic counter in a complete Rust program using the standard library.
Rust✓ Tested
Verify a read-only volume rejects writes
Docker / Compose: A failed write confirms the mount’s read-only behavior.
Docker / Compose✓ Tested
Write a generic first-or-fallback helper
C#: Constrain a generic helper through its input shape and return an explicit caller-supplied fallback.
C#✓ Tested
Write a generic slice helper
Write a generic slice helper using a complete Go program with explicit sample inputs.
Go✓ Tested
Write a JSON file
Save a dictionary as readable, indented JSON while preserving Unicode characters.
json✓ Tested
Write a literal multiline block
Bash Scripts: Quoting the heredoc delimiter disables parameter and command expansion inside it.
Bash Scripts✓ Tested
Write a multiline string without expanding variables
PowerShell: A single-quoted here-string preserves dollar signs literally.
PowerShell✓ Tested
Write a text file
Save a string to a UTF-8 text file and close the file automatically when the write finishes.
file✓ Tested
Write a text file
Write a C# string to a UTF-8 file.
C#✓ Tested