Read-write lock for Python
geoff.bache at gmail.com
Thu Apr 28 16:26:47 EDT 2011
On Thu, Apr 28, 2011 at 7:53 PM, D'Arcy J.M. Cain <darcy at druid.net> wrote:
> On Thu, 28 Apr 2011 19:14:45 +0200
> Geoff Bache <geoff.bache at gmail.com> wrote:
>> On Thu, Apr 28, 2011 at 4:28 PM, Jean-Michel Pichavant
>> <jeanmichel at sequans.com> wrote:
>> > What about
>> > http://docs.python.org/library/threading.html#lock-objects
>> Those aren't read-write locks. They are basic locks, which don't
>> distinguish between readers and writers. I need to be able to lock
>> between reader and writer operations, without readers locking each
>> other out.
> There really isn't any such thing as "read-write" locks.
Did you google it? I even provided the exact search terms to use in my
initial posting. It takes you straight to two standard library patch
proposals and four other solutions, all labelled this way (sometimes
"reader-writer locks" admittedly). That doesn't happen if it isn't a
I'm not looking for general advice on how to solve some specific
problem. I'm asking if anyone knows anything about the relative merits
of the above 6 solutions.
More information about the Python-list