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 brian.curtin
Recipients asksol, brian.curtin, jnoller, kristjan.jonsson, pitrou, tim.golden
Date 2011-03-26.04:09:58
SpamBayes Score 2.2231907e-06
Marked as misclassified No
Message-id <1301112599.9.0.556991061776.issue11668@psf.upfronthosting.co.za>
In-reply-to
Content
Attaching an initial patch implementing the same functionality but using WaitForMultipleObjects. Here's some details:

WFMO takes an array of objects to wait on, which is the pipe handle and sigint_event which is a handle to an event which gets set when CTRL-C is caught (see Modules/_multiprocessing/multiprocessing.c). Waiting for both objects replaces the need to write a custom loop which periodically calls PyErr_CheckSignals.

A negative timeout was effectively a blocking call, so we can let WFMO handle that with an INFINITE timeout setting.

WFMO returns the object which raised it relative from event 0, so the switch case for a CTRL-C is 0+1 and returns the same value as before. If the pipe was the object to raise, just like before: return true if there's data, false if not.
History
Date User Action Args
2011-03-26 04:09:59brian.curtinsetrecipients: + brian.curtin, pitrou, kristjan.jonsson, tim.golden, jnoller, asksol
2011-03-26 04:09:59brian.curtinsetmessageid: <1301112599.9.0.556991061776.issue11668@psf.upfronthosting.co.za>
2011-03-26 04:09:59brian.curtinlinkissue11668 messages
2011-03-26 04:09:59brian.curtincreate