Transactional read-modify-write under a single lock acquisition, preventing
lost updates when multiple processes mutate the same file. read returns the
current content (or undefined), mutate produces the new content from it,
and the result is written atomically — all while the lock is held.
Transactional read-modify-write under a single lock acquisition, preventing lost updates when multiple processes mutate the same file.
readreturns the current content (or undefined),mutateproduces the new content from it, and the result is written atomically — all while the lock is held.