diff options
| author | Kurt B. Kaiser <kbk@shore.net> | 2005-05-05 23:29:54 (GMT) | 
|---|---|---|
| committer | Kurt B. Kaiser <kbk@shore.net> | 2005-05-05 23:29:54 (GMT) | 
| commit | 20345fb8aada23ff3b02f4bd54ff9a96b994dd5b (patch) | |
| tree | 3d2470429fac7ba59bd24f12b91822b0236eb678 /Lib/idlelib/run.py | |
| parent | abb103b17a5f5b633fc2abed506c20de857d2dff (diff) | |
| download | cpython-20345fb8aada23ff3b02f4bd54ff9a96b994dd5b.zip cpython-20345fb8aada23ff3b02f4bd54ff9a96b994dd5b.tar.gz cpython-20345fb8aada23ff3b02f4bd54ff9a96b994dd5b.tar.bz2  | |
Use Queue's blocking feature instead of sleeping in the main
loop.  Patch # 1190163 Michiel de Hoon
Diffstat (limited to 'Lib/idlelib/run.py')
| -rw-r--r-- | Lib/idlelib/run.py | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 62f4cce..8adb6f1 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -82,9 +82,8 @@ def main(del_exitfunc=False):                      # exiting but got an extra KBI? Try again!                      continue              try: -                seq, request = rpc.request_queue.get(0) +                seq, request = rpc.request_queue.get(block=True, timeout=0.05)              except Queue.Empty: -                time.sleep(0.05)                  continue              method, args, kwargs = request              ret = method(*args, **kwargs)  | 
