execAsync method
Executes the batch processing in parallel.
This method applies execAsyncItem to each item in the prepResult
list and waits for all the resulting futures to complete using
Future.wait.
This matches Python's behavior:
async def _exec(self, items):
return await asyncio.gather(*(super()._exec(i) for i in items))
Implementation
@override
/// Executes the batch processing in parallel.
///
/// This method applies [execAsyncItem] to each item in the [prepResult]
/// list and waits for all the resulting futures to complete using
/// `Future.wait`.
///
/// This matches Python's behavior:
/// ```python
/// async def _exec(self, items):
/// return await asyncio.gather(*(super()._exec(i) for i in items))
/// ```
Future<List<O>> execAsync(dynamic prepResult) async {
final items = prepResult as List<I>;
final futures = items.map(execAsyncItem).toList();
return Future.wait(futures);
}