Function promising_future::all_with [] [src]

pub fn all_with<T, I, S, F>(futures: I, spawner: S) -> Future<F> where S: Spawner, T: Send + 'static, I: IntoIterator<Item=Future<T>> + Send + 'static, F: FromIterator<T> + Send + 'static

Return a Future of all values in an iterator of Futures.

Take an iterator producing Future<T> values and return a Future<Vec<T>>. The elements in the returned vector is undefined; typically it will be the order in which they resolved.

This function is non-blocking; the blocking occurs within a thread. Pass a type which implements Spawner which is used to produce the thread.