On Mon, Feb 10, 2014 at 1:45 AM, Roy Smith <r...@panix.com> wrote:
> In article <mailman.6578.1391943647.18130.python-l...@python.org>,
>  Skip Montanaro <s...@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
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to