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

Switch to using asyncio.timeout instead of asyncio.wait_for #138

Merged
merged 5 commits into from
Mar 11, 2023

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Mar 7, 2023

asyncio.wait_for creates a task whereas asyncio.timeout avoids doing this which decreases latency.

Fallback to using async_timeout when the python version is too old (<3.11)

asyncio.timeout will become the underlying implementation for async.wait_for in cpython 3.12 python/cpython#98518

`asyncio.wait_for` creates a task whereas `asyncio.timeout` avoids doing this.

Fallback to using `async_timeout` when the python version is too old (<3.11)

`asyncio.timeout` will become the underlying implementation for `async.wait_for` in cpython 3.12
python/cpython#98518
@bdraco bdraco marked this pull request as ready for review March 7, 2023 22:41
@mdonoughe mdonoughe merged commit c11a6b0 into gurumitts:dev Mar 11, 2023
@bdraco
Copy link
Contributor Author

bdraco commented Mar 11, 2023

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants