addIsolateInitializerWithDeferredParam<P> method

void addIsolateInitializerWithDeferredParam<P>(
  1. RunInsideIsolateInitializer<P> init,
  2. P param()
)

Adds an initializer - this is run on each isolate that's spawned, and contains any common setup. The parameter passed to the isolate must be a valid isolate message, but can be deferred until the time of isolate creation.

Once the isolate is created, the value of P will not be resolved again.

Implementation

void addIsolateInitializerWithDeferredParam<P>(
    RunInsideIsolateInitializer<P> init, P param()) {
  isolateInitializers.add(InitializerWithParam<P>(param, init));
}