This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author kristjan.jonsson
Recipients kristjan.jonsson
Date 2010-05-24.09:55:37
SpamBayes Score 0.20036334
Marked as misclassified No
Message-id <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2010-05-24 09:55:43kristjan.jonssonsetrecipients: + kristjan.jonsson
2010-05-24 09:55:42kristjan.jonssonsetmessageid: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za>
2010-05-24 09:55:40kristjan.jonssonlinkissue8800 messages
2010-05-24 09:55:39kristjan.jonssoncreate