Skip to content

coroutine ¤

AnyException ¤

AnyException(exceptions: List[Exception])

Bases: RuntimeError

Error indicating that all coroutines passed to any() failed with an exception.

call ¤

call(call: Call) -> Any

Make an asynchronous function call and return its result. If the function call fails with an error, the error is raised.

gather ¤

gather(*awaitables: Awaitable[Any]) -> List[Any]

Alias for all.

all ¤

all(*awaitables: Awaitable[Any]) -> List[Any]

Concurrently run a set of coroutines, blocking until all coroutines return or any coroutine raises an error. If any coroutine fails with an uncaught exception, the exception will be re-raised here.

any ¤

any(*awaitables: Awaitable[Any]) -> List[Any]

Concurrently run a set of coroutines, blocking until any coroutine returns or all coroutines raises an error. If all coroutines fail with uncaught exceptions, the exception(s) will be re-raised here.

race ¤

race(*awaitables: Awaitable[Any]) -> List[Any]

Concurrently run a set of coroutines, blocking until any coroutine returns or raises an error. If any coroutine fails with an uncaught exception, the exception will be re-raised here.