terminateWorkers method

Future terminateWorkers()

Calls kill on all worker processes.

Implementation

Future terminateWorkers() async {
  for (var worker in _readyWorkers.toList()) {
    _killWorker(worker);
  }
  await Future.wait(_spawningWorkers.map((worker) async {
    _killWorker(await worker);
  }));
}