[New-bugs-announce] [issue8800] add threading.RWLock

Kristján Valur Jónsson report at bugs.python.org
Mon May 24 11:55:42 CEST 2010

New submission from Kristján Valur Jónsson <kristjan at ccpgames.com>:

Provided is a patch, implementing a RWLock using a ConditionVariable and Lock.
It has rdlock() and wrlock() methods, and an unlock() method, similar to the rwlock API in pthreads.
It has context managers rdlocked() and wrlocked().
In addition, it conforms to the RLock interface, with acquire() and release() being aliases to wrlock() and unlock() respectively and when used as a context manager, it gets a wrlock()
There is no documentation yet, since this is just a proposal, but there are unit tests.

See also issue 8777 for another locking primitive, the Barrier.

components: Library (Lib)
files: rwlock.patch
keywords: needs review, patch, patch
messages: 106350
nosy: krisvale
priority: normal
severity: normal
status: open
title: add threading.RWLock
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file17448/rwlock.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list