[Twisted-Python] Unused variables in doSelect
twisted at itamarst.org
Thu Feb 28 04:00:39 EST 2002
Andrew Bennetts wrote:
> Incidentally, the reason why I'm looking at doSelect in the first
> place is that something seems to have changed in 0.15.2 (since
> 0.15.0) that (on Windows at least) prevents Ctrl-C or Ctrl-Break
> from interrupting the process immediately -- it can take up to a
> minute for it to respond. I haven't yet figured out why, there's
> nothing obvious wrong. This also applies to stopping it when running
> as a Win NT service. On the other hand, it no longer constantly
> uses 1% of the cpu even when idle. I can reproduce this behaviour
> with simpleserv.py, so it's not my code causing it :)
OK, I figured out what the issue is - glyph changed the selec.tselect()
so that it doesn't get a timeout, so it basically freezes until it gets
a connection (unless you have a Delayed). Apparently on Windows the
select() system call an't be interrupted.
Add a Delayed with a timeout of 0.01 so the select loop doesn't freeze?
Win32 API event loop. Patches accepted.
More information about the Twisted-Python