pub fn select_array<Fut: Future, const N: usize>(
    arr: [Fut; N]
) -> SelectArray<Fut, N> 
Expand description

创建一个新的 future,它将在 所有future组成的数组中 选择合适的future。

返回的future将会等待任何一个future准备就绪, 一旦其完成,将返回解析的项目,以及准备就绪的 future 的索引。

如果数组为空,那么结果 future 将永远处于 Pending 状态。


Creates a new future which will select over an array of futures.

The returned future will wait for any future to be ready. Upon completion the item resolved will be returned, along with the index of the future that was ready.

If the array is empty, the resulting future will be Pending forever.