close method

  1. @override
Future<void> close()
override

Stop the runner.

If the runner has allocated resources, e.g., an isolate, it should be released. No further calls to run should be made after calling stop.

Implementation

@override
Future<void> close() {
  var stopFuture = _stopFuture;
  if (stopFuture != null) return stopFuture;
  _stopFuture = (stopFuture =
      MultiError.waitUnordered(_queue.removeAll().map((e) => e.close()))
          .then(ignore));
  return stopFuture;
}