Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65783

Re: system wide mutex

References <cf62da1e-45f0-4ace-924a-b3035063c71e@googlegroups.com> <mailman.6578.1391943647.18130.python-list@python.org> <roy-960294.09455209022014@news.panix.com>
Date 2014-02-10 09:09 +1100
Subject Re: system wide mutex
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.6603.1391983767.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Mon, Feb 10, 2014 at 1:45 AM, Roy Smith <roy@panix.com> wrote:
> In article <mailman.6578.1391943647.18130.python-list@python.org>,
>  Skip Montanaro <skip@pobox.com> wrote:
>
>> 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?
>

Not quite all; mandatory locks actually prevent other access. But they
require support from whatever makes the resource available - most
commonly, the file system - where cooperative locking doesn't. I've
written a number of cooperative locking systems in the past (eg to
protect a network resource, when the mounted file system didn't offer
the sort of locking I needed), and they're usually the way to go when
there's anything complicated going on.

What, all mutexes?
Yes, all mutexes!
What, all?
Well.... nearly all!

-- with apologies to WS Gilbert, HMS Pinafore, and the Pirates of Penzance

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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