[Twisted-Python] No-op TimerService on Windows?

glyph at divmod.com glyph at divmod.com
Thu May 4 10:26:22 EDT 2006



On Thu, 4 May 2006 11:05:21 +0200, Eric Faurot <eric.faurot at gmail.com> wrote:

>In the process of exploring my options for deploying twisted
>applications on Windows, I noticed that when running the application,
>_twistw (line 43) also starts a TimerService around a no-op:
>
>app.startApplication(internet.TimerService(0.1, lambda:None), 0)
>
>I suppose there is very good reason to do so, but I do not see it.
>Can somebody enlighten me?

There should be a comment or something to this effect, but:

On Windows, the "signal" handling that Control-c triggers doesn't actually interrupt select().  That timer is there to keep the timeout low so that the server responds in a timely fashion when the user hits Control-c on the console, even if nothing else is happening.




More information about the Twisted-Python mailing list