Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_asyncore: Optimize capture_server() #93867

Merged
merged 1 commit into from
Jun 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test_asyncore: Optimize capture_server()
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
commit 976bf0deeb5c381f285c6c4d3dd98215e3bf9a86
1 change: 0 additions & 1 deletion Lib/test/test_asyncore.py
Original file line number Diff line number Diff line change
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