Message9840

Author jmadden
Recipients jmadden, zyasoft
Date 2015-04-14.15:32:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1429025540.1.0.784516360986.issue2328@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2015-04-14 15:32:20jmaddensetmessageid: <1429025540.1.0.784516360986.issue2328@psf.upfronthosting.co.za>
2015-04-14 15:32:20jmaddensetrecipients: + jmadden, zyasoft
2015-04-14 15:32:20jmaddenlinkissue2328 messages
2015-04-14 15:32:19jmaddencreate