Skip to content

Commit

Permalink
test_asyncore: Optimize capture_server() (#93867)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
vstinner committed Jun 15, 2022
1 parent 41fccd2 commit 46e455f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Lib/test/test_asyncore.py
Expand Up @@ -87,7 +87,6 @@ def capture_server(evt, buf, serv):
break
if n <= 0:
break
time.sleep(0.01)

conn.close()
finally:
Expand Down

0 comments on commit 46e455f

Please sign in to comment.