Message9840
If RLock and Lock are still sharing the same implementation though, wouldn't the Semaphore(1) approach then turn around and break RLock (which has to be acquirable and releasable an arbitrary number of times, albeit by the same thread)?
I haven't studied the implementation that much, but I was imagining something like making Lock a base class (AbstractLock) with a flag set by its subclasses Lock and RLock controlling whether 'isHeldByCurrentThread' is checked on release or not. But that was just my first thought and I don't know that much about how Java classes get exposed to Python. Or maybe you also meant a separate implementation of Lock with Semaphore and using the current implementation as RLock? |
|
Date |
User |
Action |
Args |
2015-04-14 15:32:20 | jmadden | set | messageid: <1429025540.1.0.784516360986.issue2328@psf.upfronthosting.co.za> |
2015-04-14 15:32:20 | jmadden | set | recipients:
+ jmadden, zyasoft |
2015-04-14 15:32:20 | jmadden | link | issue2328 messages |
2015-04-14 15:32:19 | jmadden | create | |
|