3 ms·
As another poster said - syncing is unreliable. On Windows even if you use native API to open a file in a write-through mode with no caching (FILE_FLAG_WRITE_T
by abcd_f 9y ago
As another poster said - syncing is unreliable.
On Windows even if you use native API to open a file in a write-through mode with no caching (FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING), you will still end up with zero-filled files if the machine is power cycled or blue-screened in the right moment. Disk controllers cache aggressively and there's not much an OS can do about it.