forEachAsync<V> function
Iterable elements of source
with support async function and runs it's in parallels
Implementation
Future<void> forEachAsync<V>(
Iterable<V> source, Future<void> Function(V elemente) forEach,
[int parallels = 1]) async {
for (final Iterable<V> group in groupBySize<V>(source, parallels)) {
await Future.wait(group.map(forEach));
}
}