Message106350
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. |
|
Date |
User |
Action |
Args |
2010-05-24 09:55:43 | kristjan.jonsson | set | recipients:
+ kristjan.jonsson |
2010-05-24 09:55:42 | kristjan.jonsson | set | messageid: <1274694942.46.0.488506239249.issue8800@psf.upfronthosting.co.za> |
2010-05-24 09:55:40 | kristjan.jonsson | link | issue8800 messages |
2010-05-24 09:55:39 | kristjan.jonsson | create | |
|