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 tim.peters
Recipients pitrou, sbt, tim.peters, vstinner
Date 2013-10-08.16:58:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381251493.4.0.801188289609.issue19158@psf.upfronthosting.co.za>
In-reply-to
Content
This is the "right" way to do it:  the subclass wants to extend the behavior of the base class .release(), not to replace it.  Calling the base class .release() is the natural and obvious way to do that.  It's also utterly normal for a lock used by multiple methods to be acquired & released multiple times - that's what an RLock is for.  What's odd to my eyes is that Semaphore - before the patch - went out of its way to _not_ use an RLock in its condition variable (Conditions use an RLock by default, for good reasons).

About acquire(), this is a bugfix - I'm not looking here to change code that isn't broken ;-)
History
Date User Action Args
2013-10-08 16:58:13tim.peterssetrecipients: + tim.peters, pitrou, vstinner, sbt
2013-10-08 16:58:13tim.peterssetmessageid: <1381251493.4.0.801188289609.issue19158@psf.upfronthosting.co.za>
2013-10-08 16:58:13tim.peterslinkissue19158 messages
2013-10-08 16:58:13tim.peterscreate