It's actually a sort of trend they have in there, somewhere (from this bug):
static gboolean
pyg_signal_watch_prepare(GSource *source,
int *timeout)
{
/* Python only invokes signal handlers from the main thread,
* so if a thread other than the main thread receives the signal
* from the kernel, PyErr_CheckSignals() from that thread will
* do nothing. So, we need to time out and check for signals
* regularily too.
* Also, on Windows g_poll() won't be interrupted by a signal
* (AFAIK), so we need the timeout there too.
*/
#ifndef PLATFORM_WIN32
if (pyg_threads_enabled)
#endif
*timeout = 100;
return FALSE;
}
And on Windows, it'll suck all the time. It's kind of ironic, considering signals don't exist on Windows. In any case, see also kernelslacker's paper/slides from OLS2006, and strace random processes on your system, it's all rather depressing. I didn't mean to point a finger at Python in particular, as much as to anyone who might be doing such awful things, be them libreadline, Python or whoever.
no subject
And on Windows, it'll suck all the time. It's kind of ironic, considering signals don't exist on Windows. In any case, see also