WorkerPool createWorkerScriptPool(int count, Uri uri, { Map<String, dynamic> metadata })

Source

WorkerPool createWorkerScriptPool(int count, Uri uri,
    {Map<String, dynamic> metadata}) {
  var workers = <WorkerSocket>[];
  for (var i = 1; i <= count; i++) {
    workers.add(createWorkerScript(uri,
      metadata: {
        "workerId": i
      }..addAll(metadata == null ? {} : metadata)
    ));
  }
  return new WorkerPool(workers);
}