Function bitbazaar::threads::batch_futures_flat
source ยท pub async fn batch_futures_flat<R, Fut: Future<Output = R>>(
limit: usize,
fut_cbs: impl IntoIterator<Item = impl FnOnce() -> Fut>,
) -> Vec<R>Expand description
A simple and performant runner for an iterator of future creators. The futures are run in parallel up to the supplied limit. The results are returned in the same order as the inputted futures.
Returns:
- Vec of results in the same order as the inputted futures.