From: Kurt B. Kaiser Date: Thu, 5 May 2005 23:29:54 +0000 (+0000) Subject: Use Queue's blocking feature instead of sleeping in the main X-Git-Tag: v2.5a0~1792 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20345fb8aada23ff3b02f4bd54ff9a96b994dd5b;p=thirdparty%2FPython%2Fcpython.git Use Queue's blocking feature instead of sleeping in the main loop. Patch # 1190163 Michiel de Hoon --- diff --git a/Lib/idlelib/NEWS.txt b/Lib/idlelib/NEWS.txt index 06702559ac2e..afec8e422f30 100644 --- a/Lib/idlelib/NEWS.txt +++ b/Lib/idlelib/NEWS.txt @@ -3,6 +3,9 @@ What's New in IDLE 1.2a0? *Release date: XX-XXX-2005* +- run.py: use Queue's blocking feature instead of sleeping in the main + loop. Patch # 1190163 Michiel de Hoon + - Add config-main option to make the 'history' feature non-cyclic. Default remains cyclic. Python Patch 914546 Noam Raphael. diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 62f4ccea2926..8adb6f1e76d6 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)