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