spawn static method

Future<MultiIsolateServer> spawn(
  1. int isolates,
  2. Future<Server> spawn(
    1. SendPort?
    ), {
  3. required Uri url,
  4. Logger? logger,
})

Implementation

static Future<MultiIsolateServer> spawn(
  int isolates,
  Future<Server> Function(SendPort?) spawn, {
  required Uri url,
  Logger? logger,
}) async {
  var multiIsolateServer = MultiIsolateServer(url, logger);
  await multiIsolateServer.start(isolates, spawn);
  return multiIsolateServer;
}