asyncx.wait_all

async asyncx.wait_all(*awaitables)[source]

Creates a coroutine that waits for all of given awaitables to be completed.

Example

>>> coro1 = asyncio.create_task(asyncio.sleep(1))
>>> coro2 = asyncio.create_task(asyncio.sleep(2))
>>> ret = await asyncx.wait_all(coro1, coro2)
>>> set(ret) == {coro1, coro2}
True
Parameters

awaitables (Awaitable[Any]) – Awaitable objects to wait.

Returns

A Coroutine object that returns a list of completed asyncio.Future object.

Return type

Sequence[Awaitable[Any]]