dispose method

Future<void> dispose()

Closes every candidate, including ones never selected (a candidate that failed after starting a child process still has one to reap).

Implementation

Future<void> dispose() async {
  _active = null;
  for (final candidate in candidates) {
    try {
      await candidate.close();
    } on Object {
      // Shutdown is best-effort; a failed close must not mask the others.
    }
  }
  await _notices.close();
}