customCompute<T, E> function
Implementation
Future<T> customCompute<T, E>(
FutureOr<T> Function(E message) callback,
E message,
) async {
ReceivePort receivePort = ReceivePort();
Isolate isolate = await Isolate.spawn((message) {}, message);
var res = await _wrapper(callback, message, receivePort.sendPort);
isolate.kill();
receivePort.close();
return res;
}