[issue8800] add threading.RWLock

Antoine Pitrou report at bugs.python.org
Thu Oct 4 03:02:48 CEST 2012


Antoine Pitrou added the comment:

I don't like the API. Why should I write "rwlock.acquire_read()" instead of "rwlock.reader.acquire()"? There should be one obvious way to do it.

The fact that "reader_lock" and "writer_lock" return a new object every time is a bit suboptimal, IMO.

Also, RWLockBase should be private (_RWLockBase).

Ah, and the patch needs docs :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8800>
_______________________________________


More information about the Python-bugs-list mailing list