Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65740
| References | <cf62da1e-45f0-4ace-924a-b3035063c71e@googlegroups.com> |
|---|---|
| Date | 2014-02-09 05:00 -0600 |
| Subject | Re: system wide mutex |
| From | Skip Montanaro <skip@pobox.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6578.1391943647.18130.python-list@python.org> (permalink) |
> 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. It also has bugs which have been reported which I have yet to spend any time fixing. Beyond that, your question isn't really detailed enough to answer completely. You don't identify what sort of systems you need this to work on (Windows, Mac, various flavors of Unix?), whether programs written in other languages will be involved (you did say "system wide"), and whether you need to use it in the face of network file systems like NFS or Samba. Skip
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
system wide mutex Asaf Las <roegltd@gmail.com> - 2014-02-09 02:39 -0800
Re: system wide mutex Asaf Las <roegltd@gmail.com> - 2014-02-09 03:00 -0800
Re: system wide mutex Skip Montanaro <skip@pobox.com> - 2014-02-09 05:00 -0600
Re: system wide mutex Asaf Las <roegltd@gmail.com> - 2014-02-09 03:07 -0800
Re: system wide mutex Roy Smith <roy@panix.com> - 2014-02-09 09:45 -0500
Re: system wide mutex Skip Montanaro <skip@pobox.com> - 2014-02-09 09:40 -0600
Re: system wide mutex Chris Angelico <rosuav@gmail.com> - 2014-02-10 09:09 +1100
Re: system wide mutex Marko Rauhamaa <marko@pacujo.net> - 2014-02-09 18:14 +0200
Re: system wide mutex Asaf Las <roegltd@gmail.com> - 2014-02-09 09:39 -0800
Re: system wide mutex Grant Edwards <invalid@invalid.invalid> - 2014-02-10 17:00 +0000
Re: system wide mutex Miki Tebeka <miki.tebeka@gmail.com> - 2014-02-10 09:46 -0800
csiph-web