select_handles
fn select_handles<I>(pending_reqs: I) -> (Result<(ResponseHandle, BodyHandle), SendErrorCause>, usize, Vec<PendingRequestHandle>)whereGiven a collection of PendingRequestHandles, block until the result of one of the handles is
ready.
This function accepts any type which can become an iterator that yields handles; a common choice
is Vec<PendingRequestHandle>.
Returns a tuple (result, index, remaining), where:
resultis the result of the handle that became ready.indexis the index of the handle in the argument collection (e.g., the index of the handle in a vector) that became ready.remainingis a vector containing all of the handles that did not become ready. The order of the handles in this vector is not guaranteed to match the order of the handles in the argument collection.
Panics
Panics if the argument collection is empty, or contains more than
fastly_shared::MAX_PENDING_REQS handles.
Parameters
- pending_reqs: I
Returns