computeIsolate<I, O> function
Implementation
Future<O> computeIsolate<I, O>(IsolateComputer<I, O> isolateComputer, I input) {
final p = ReceivePort();
void runner(List<dynamic> input) =>
isolateComputer(input[1]).then((value) => Isolate.exit(input[0], value));
Isolate.spawn<List<dynamic>>(runner, [p.sendPort, input]);
return p.first.then((value) => value as O);
}