[Python-bugs-list] [ python-Bugs-454307 ] select.select locks up IDE
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 26 Aug 2001 09:54:52 -0700
Bugs item #454307, was opened at 2001-08-22 11:42
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=454307&group_id=5470
Category: Macintosh
Group: Platform-specific
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Emanon Adespoton (emanon)
Assigned to: Just van Rossum (jvr)
Summary: select.select locks up IDE
Initial Comment:
Running Medusa with int->long patches etc., calls to
select.select (polling mode) lock up server computer
until data is sent to the listening port. AFAIK,
select was designed to get around such behaviour.
Also, when select.select is running, there is no way
to halt the process when in debug mode; the only way
to stop the code from running is to cmd-ctrl-esc out
of the IDE.
This was tried under MacOS 9.1 using MacPython 2.1.1.
The same code runs fine on WinPython 2.1.1.
----------------------------------------------------------------------
Comment By: Just van Rossum (jvr)
Date: 2001-08-26 09:53
Message:
Logged In: YES
user_id=92689
I don't agree this is a bug at all: the IDE currently
doesn't do multi threading. However, there *is* a solution
for the IDE: you should register asyncore.poll as an idle
handler, like so:
import W, asyncore
W.getapplication().addidlefunc(asyncore.poll)
Further discussion to the macpython list please: I'm on
vacation ,-)
----------------------------------------------------------------------
Comment By: Jack Jansen (jackjansen)
Date: 2001-08-23 06:35
Message:
Logged In: YES
user_id=45365
This is a known problem with the IDE: it can only interrupt a script (or give cycles
to other applications, or pass mouse presses and such along) when it gets control, and if
the script doesn't print to stdout or otherwise invokes the IDE it will not get control.
This problem not only exists with select.select, but also with infinite loops, time.sleep()
and various other methods.
The quick solution is to run your script under the bare PythonInterpreter, which does not have
this problem.
And I'm assigning the bug to Just (although a solution will probably require joint work
from both of us).
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=454307&group_id=5470