New submission from Kristján Valur Jónsson <krist...@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 <rep...@bugs.python.org> <http://bugs.python.org/issue8800> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com