[Twisted-Python] Unused variables in doSelect
andrew at puzzling.org
Thu Feb 28 21:50:03 EST 2002
On Thu, Feb 28, 2002 at 04:00:39AM -0500, Itamar Shtull-Trauring wrote:
> 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.
Ah! Thank you, that explains it perfectly.
Incidentally, I haven't yet tested this under cygwin, I suspect its version
of Python would allow select to be interrupted..
> Add a Delayed with a timeout of 0.01 so the select loop doesn't freeze?
Hmm, 0.5 or 1 is plenty for what I need.
> Real Solution:
> Win32 API event loop. Patches accepted.
I'll look into it, but I'm no Win32 API guru -- maybe it's time I learnt ;).
I've looked at win32event module a little before, so I'll see what I can do.
More information about the Twisted-Python