Pool.collect_any()
Wait on several tasks.
Usage
Pool.collect_any(
tasks,
timeout=None,
)Parameters
tasks: _Iterable[Task]-
The
Taskhandles to wait on. timeout: float | None = None- Seconds to wait; None waits indefinitely.
Returns
(index, value)of the first terminal task, or the-
TIMEOUTsentinel. A non-OK outcome raises with anindexattribute (0-based).