Read-write lock for Python

Geoff Bache geoff.bache at
Thu Apr 28 16:26:47 EDT 2011

On Thu, Apr 28, 2011 at 7:53 PM, D'Arcy J.M. Cain <darcy at> wrote:
> On Thu, 28 Apr 2011 19:14:45 +0200
> Geoff Bache <geoff.bache at> wrote:
>> On Thu, Apr 28, 2011 at 4:28 PM, Jean-Michel Pichavant
>> <jeanmichel at> wrote:
>> > What about
>> >
>> >
>> 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
standard problem.

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.

Geoff Bache

More information about the Python-list mailing list