Skip to content

Commit 46e455f

Browse files
authored
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).
1 parent 41fccd2 commit 46e455f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Lib/test/test_asyncore.py

-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def capture_server(evt, buf, serv):
8787
break
8888
if n <= 0:
8989
break
90-
time.sleep(0.01)
9190

9291
conn.close()
9392
finally:

0 commit comments

Comments
 (0)