Future<WorkerSocket> spawn([WorkerFunction function ])

Source

Future<WorkerSocket> spawn([WorkerFunction function]) async {
  if (function == null) {
    function = defaultWorkerFunction;
  }

  var meta = {
    "methods": slaves
  };

  return await createWorker(function, metadata: meta).init(methods: hosts);
}