In article <mailman.6578.1391943647.18130.python-l...@python.org>, Skip Montanaro <s...@pobox.com> wrote:
> > Which one is most recommended to use for mutex alike locking to > > achieve atomic access to single resource: > > > > - fcntl.lockf > > - os.open() with O_SHLOCK and O_EXLOCK > > - https://pypi.python.org/pypi/lockfile/0.9.1 > > - https://pypi.python.org/pypi/zc.lockfile/1.1.0 > > - any other ? > > As the author of lockfile, I can tell you it only implements advisory > locking. All programs needing to access the locked resources must > cooperate. This is true of all mutexes, no? We needed a mutex that worked across multiple machines, so we ended up implementing a mutex in memcache. We based ours on http://tinyurl.com/lybx2kl, but if you google for "memcache mutex python", you'll find a number of implementations. -- https://mail.python.org/mailman/listinfo/python-list