forEachIsolateHelper function
Implementation
Future<void> forEachIsolateHelper(
VmService vmService,
Future<void> Function(IsolateRef) callback,
) async {
final vm = await vmService.getVM();
final futures = <Future<void>>[];
for (final isolate in vm.isolates ?? []) {
futures.add(callback(isolate));
}
await Future.wait(futures);
}