chicken_turtle_util.asyncio¶
Extensions to asyncio.
Requires Python >=3.5
stubborn_gather |
Stubbornly wait for awaitables, despite some of them raising |
-
chicken_turtle_util.asyncio.
stubborn_gather
(*awaitables)[source]¶ Stubbornly wait for awaitables, despite some of them raising
Like a more stubborn version of asyncio.gather.
Continue until all awaitables have finished or have raised. If one or more awaitables raise, a new Exception is raised with the traceback and message of each exception as message. However, if all exceptions raised are asyncio.CancelledError, asyncio.CancelledError is raised instead.
If cancelled, cancels the (futures associated with the) awaitables.
Parameters: awaitables : iterable(awaitable)
Awaitables to await
Returns: results :: (any, ...)
Return of each awaitable. The return of
awaitables[i]
isresults[i]
.