Closed bdraco closed 1 year ago
asyncio.wait_for creates a task whereas asyncio.timeout avoids doing this which decreases latency.
asyncio.wait_for
asyncio.timeout
Fallback to using async_timeout when the python version is too old (<3.11)
async_timeout
asyncio.timeout will become the underlying implementation for async.wait_for in cpython 3.12 https://github.com/python/cpython/pull/98518
async.wait_for
thanks
asyncio.wait_for
creates a task whereasasyncio.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 forasync.wait_for
in cpython 3.12 https://github.com/python/cpython/pull/98518