initialize static method

Future<void> initialize(
  1. IsolateInitializer initializer,
  2. IsolateManagerCreator createIsolate,
  3. IsolateInitializeArguments args
)

Implementation

static Future<void> initialize(
  IsolateInitializer initializer,
  IsolateManagerCreator createIsolate,
  IsolateInitializeArguments args
) async {
  instance?.dispose();

  final isolateManager = await createIsolate(
    _isolatedWorkerRunner,
    initializer,
    args
  );

  instance = IsolateWorkerManager._(
    isolateManager,
    IsolateConnector(
      isolateManager.messenger.add,
      isolateManager.messenger,
    )
  );
}