Note: I believe that similar functionality can be achieve in Linux (and probably Mac OS) using flock(), and passing LOCK_EX | LOCK_NB to request an exclusive lock while not blocking the application.
Ideally if we decided to go with something like this, I think someone should write the code to access the file in a safe way, and then share that code for everyone else to use, because it's only useful if everyone does it properly.