start method
Spawns the worker isolate with entryPoint.
Implementation
Future<void> start(void Function(dynamic) entryPoint) async {
if (_disposed) return;
final isolate = await Isolate.spawn(entryPoint, _receivePort.sendPort);
if (_disposed) {
isolate.kill(priority: Isolate.immediate);
} else {
_isolate = isolate;
}
}