diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-15 16:28:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-15 16:28:31 (GMT) |
commit | 46e455f21c23b03fd68055fbd97e9d0c449f00a5 (patch) | |
tree | 6708d1f01c158a3fda4554849cc9f69462233d4d /Lib/test | |
parent | 41fccd23e9b4397d6cc294b42e1a198cd8f8b268 (diff) | |
download | cpython-46e455f21c23b03fd68055fbd97e9d0c449f00a5.zip cpython-46e455f21c23b03fd68055fbd97e9d0c449f00a5.tar.gz cpython-46e455f21c23b03fd68055fbd97e9d0c449f00a5.tar.bz2 |
test_asyncore: Optimize capture_server() (#93867)
Remove time.sleep(0.01) in test_asyncore capture_server(). The sleep
was redundant and inefficient, since the loop starts with
select.select() which also implements a sleep (poll for socket data
with a timeout).
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncore.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index 1564221..dd6b3a3 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -87,7 +87,6 @@ def capture_server(evt, buf, serv): break if n <= 0: break - time.sleep(0.01) conn.close() finally: |