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, loewis, paul.moore, pitrou, python-dev, sbt, vstinner
Date 2012-06-19.13:26:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1340112391.22.0.515101190977.issue15038@psf.upfronthosting.co.za>
In-reply-to
Content
Yes, another correct observation.  This can if a thread is interrupted in between releasing the mutex and waiting for the semaphore.
I see no way around this apart from manually creating event objects for every thread.

Personally I'm not sure it is a wise guarantee to make.  The shift has been away from "handover" semantics towards "retry" semantics for locking in general over the last few years, particularly with the rise of multiprocessing.  But this distinction should be made clear and I will make sure to document it.  Thanks for pointing this out.
History
Date User Action Args
2012-06-19 13:26:31kristjan.jonssonsetrecipients: + kristjan.jonsson, loewis, paul.moore, pitrou, vstinner, python-dev, sbt
2012-06-19 13:26:31kristjan.jonssonsetmessageid: <1340112391.22.0.515101190977.issue15038@psf.upfronthosting.co.za>
2012-06-19 13:26:30kristjan.jonssonlinkissue15038 messages
2012-06-19 13:26:30kristjan.jonssoncreate