diff options
author | Andrew Svetlov <andrew.svetlov@gmail.com> | 2022-03-10 18:05:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 08:05:20 -0800 |
commit | f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5 (patch) | |
tree | d67041f2121c19f1ba0a6a723a8aeccb771d3614 /Lib/test/test_codecs.py | |
parent | 32bf3597922ac3f613989582afa2bff43bea8a2f (diff) | |
download | cpython-f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5.tar.gz cpython-f537b2a4fb86445ee3bd6ca7f10bc9d3a9f37da5.zip |
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>
Diffstat (limited to 'Lib/test/test_codecs.py')
0 files changed, 0 insertions, 0 deletions