pub fn select_slice<'a, Fut: Future>(
    slice: &'a mut [Fut]
) -> SelectSlice<'a, Fut> 
Expand description

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

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

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


Creates a new future which will select over a slice 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 slice is empty, the resulting future will be Pending forever.