shutdownOnCompletion method

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

Kill the spawned process after processing current items in queue.

Implementation

@override
Future<void> shutdownOnCompletion() async {
  // Exit-lock.
  var _ = await Future.wait(_processGroup.map((process) => process.shutdownOnCompletion()));

  // Notification.
  _processingIsComplete.complete();

  return;
}