bpo-46771: Implement asyncio context managers for handling timeouts (GH-31394)
Example:
async with asyncio.timeout(5):
await some_task()
Will interrupt the await and raise TimeoutError if some_task() takes longer than 5 seconds.
Co-authored-by: Guido van Rossum <guido@python.org> A
Andrew Svetlov committed
f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5
Parent: 32bf359
Committed by GitHub <noreply@github.com>
on 3/10/2022, 4:05:20 PM