mapAsStream<V> function
Iterable elements of source
with support async and emits each forEach
async end
Implementation
Stream<V> mapAsStream<V>(
Iterable<V> source, Future<V> Function(V elemente) forEach,
[int parallels = 1]) async* {
for (final Iterable<V> group in groupBySize<V>(source, parallels)) {
for (final V result in (await Future.wait(group.map(forEach)))) {
yield result;
}
}
}