summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/rpc.py
diff options
context:
space:
mode:
authorKurt B. Kaiser <kbk@shore.net>2003-03-11 22:55:56 (GMT)
committerKurt B. Kaiser <kbk@shore.net>2003-03-11 22:55:56 (GMT)
commit7c2213206924dabbc8a674ee74085a07f0fc6c51 (patch)
treeeaae8f4a7d8266d8f788fa5c62392e9fc268cb84 /Lib/idlelib/rpc.py
parent2b477565adbe560b0edd8bebdad7792cfc400183 (diff)
downloadcpython-7c2213206924dabbc8a674ee74085a07f0fc6c51.zip
cpython-7c2213206924dabbc8a674ee74085a07f0fc6c51.tar.gz
cpython-7c2213206924dabbc8a674ee74085a07f0fc6c51.tar.bz2
M rpc.py
M run.py 1. Clarify that rpc.SocketIO._getresponse() currently blocks on socket. 2. Improve exception handling in subprocess when GUI terminates abruptly.
Diffstat (limited to 'Lib/idlelib/rpc.py')
-rw-r--r--Lib/idlelib/rpc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/rpc.py b/Lib/idlelib/rpc.py
index 2939f5f..9895ac8 100644
--- a/Lib/idlelib/rpc.py
+++ b/Lib/idlelib/rpc.py
@@ -240,9 +240,9 @@ class SocketIO:
self.debug("_getresponse:myseq:", myseq)
if threading.currentThread() is self.mainthread:
# Main thread: does all reading of requests or responses
- # Loop here until there is message traffic on the socket
+ # Loop here, blocking each time until socket is ready.
while 1:
- response = self.pollresponse(myseq, None)
+ response = self.pollresponse(myseq, wait=None)
if response is not None:
return response
else:
@@ -346,7 +346,7 @@ class SocketIO:
message = self.pollmessage(wait)
if message is None: # socket not ready
return None
- wait = 0.0
+ #wait = 0.0 # poll on subsequent passes instead of blocking
seq, resq = message
self.debug("pollresponse:%d:myseq:%s" % (seq, myseq))
if resq[0] == "call":