registerWorker static method

void registerWorker(
  1. String id,
  2. WorkerCreator creator
)

Registers a worker creator in the isolate. id is the unique identifier for the worker type. creator is the function that creates the worker.

Implementation

static void registerWorker(String id, WorkerCreator creator) {
  _send(RegisterWorkerCommand(id, creator));
}