ext_191267 ([identity profile] pphaneuf.livejournal.com) wrote in [personal profile] pphaneuf 2006-09-16 08:49 am (UTC)

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 [livejournal.com profile] 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.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting