posted 9 years ago
If the threads are running in the same Virtual Machine, then reads are always guaranteed to see the latest writes, regardless of whether you use the SYNC option. This is assuming that the reading thread didn't buffer the file content in the mean time.
The SYNC option is only used to make sure that when your write operations return, the data is indeed written to the underlying storage device, but only if it's a local device. It has nothing to do with visibility of written data, and can not be used to guarantee that different programs on the same machine see each other's writes.