4 ms·
rename(2) atomic replacement only means atomic with respect to processes running on the system at the same time: anyone looking up the newpath will get either t
by caf 11y ago
rename(2) atomic replacement only means atomic with respect to processes running on the system at the same time: anyone looking up the newpath will get either the old file or the new file (and won't, for example, see a spurious ENOENT).
It doesn't mean atomic with respect to a system crash.
The easiest way to get asynchronous fsync(2) is to do the fsync(2) in a different thread.
- jstimpfle 11y ago> The easiest way to get asynchronous fsync(2) is to do the fsync(2) in a different thread. However you would need to create a new thread for each simultaneous asynchronous fsync to get the benefits of asynchronicity.