From 1150d4767896bd34ae3e350636613abf526bdd2a Mon Sep 17 00:00:00 2001 From: John Reese Date: Sun, 6 Feb 2022 23:52:10 -0800 Subject: [PATCH] Document cancelation semantics for as_completed --- aioitertools/asyncio.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aioitertools/asyncio.py b/aioitertools/asyncio.py index 5ba04e5..c6a502e 100644 --- a/aioitertools/asyncio.py +++ b/aioitertools/asyncio.py @@ -29,6 +29,9 @@ async def as_completed( Unlike `asyncio.as_completed`, this yields actual results, and does not require awaiting each item in the iterable. + Cancels all remaining awaitables if a timeout is given and the timeout threshold + is reached. + Example:: async for value in as_completed(futures):