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 sangeeth
Recipients josh.r, pitrou, sangeeth
Date 2014-07-04.05:23:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1404451431.92.0.128768850012.issue21913@psf.upfronthosting.co.za>
In-reply-to
Content
I am convinced that the code is wrong. It was written with wrong assumptions. But Python 2.7 behaves differently compare to Python 3.4. I am not expecting the same behavior in Python 2.7 as in Python 3.4 but I am expecting that some form of exception is raised justifying why Condition.notify() is illegal (as per #4) in this scenario and not block.

In 3.4, I could see that the signal handler is being called (when hitting Ctrl-c) and then Condition.notify() is raising a RuntimeError. But in 2.7, I am not able to prove that the signal handler is called at all. That makes me think why the signal is not caught when control is in Condition.wait().  

Your updated code snippet behaves the same as my original code. It blocks at Condition.wait() and does not respond to Ctrl-C and no signal handler is called and also not raising any exceptions.

Thanks for the beautiful explanation!
History
Date User Action Args
2014-07-04 05:23:51sangeethsetrecipients: + sangeeth, pitrou, josh.r
2014-07-04 05:23:51sangeethsetmessageid: <1404451431.92.0.128768850012.issue21913@psf.upfronthosting.co.za>
2014-07-04 05:23:51sangeethlinkissue21913 messages
2014-07-04 05:23:51sangeethcreate