start method

  1. @override
Future<Isolate> start(
  1. int isolateId,
  2. SendPort control,
  3. SendPort error,
  4. SendPort exit,
  5. List<ReceivePort> ports,
)
override

Start the isolate isolateId. It sends its stop port to control, its errors to error and tells exit when it ends. ports are closed when the isolate ends.

Implementation

@override
Future<Isolate> start(
  int isolateId,
  SendPort control,
  SendPort error,
  SendPort exit,
  List<ReceivePort> ports,
) {
  return Isolate.spawn(
    isolateHandler,
    IsolateSpawnParameter(
      isolateId,
      Dox().config,
      Dox().doxProviders,
      routes: _baseRoutes,
      fallbacks: _baseFallbacks,
      statics: _baseStatics,
      bindings: Route().bindings,
      control: control,
      rateLimitPort: RateLimitCounter.instance.port,
      sessionPort: SessionMemoryStore.instance.port,
      busPort: IsolateBus.instance.port,
      computePort: ComputePool.instance.port,
      isolateCount: Dox().isolateCount,
      envExpand: Env().expanded,
    ),
    onError: error,
    onExit: exit,
  );
}