critical sections protecting multiple processes (not threads)
skip at pobox.com
Wed Mar 26 17:14:52 CET 2003
David> Specifically, I want to test for the existence of a file and open
David> if non-existent in an atomic fashion. Obviously, if I cannot do
David> this atomically, it is possible for the file to not exist when
David> the test is done but to exist before the creation is done.
David> I don't really know where to look in the documentation for this.
David> Any help would be appreciated, as always.
This topic came up back in January. Here's a Google link to a response of
mine with some untested code:
That should get you pointed in the right direction.
More information about the Python-list