collect_any_async()
Return an asyncio.Future for the first finished task.
Usage
collect_any_async(tasks)The async form of collect_any().
Parameters
tasks: _Iterable[Task]-
The
Taskhandles to wait on.
Returns
Anasyncio.Futureresolving with the first finished task’s-
(index, value), with the tie-breaks of collect_any(). A failure rejects with the exception collect_any() raises, including itsindexattribute. There is notimeoutargument. Useasyncio.timeoutorasyncio.wait_forinstead. Cancelling the Future detaches every task without cancelling it, so each can be collected with a blocking call.