onDispose method

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

Callback when this executor is disposed.

Subclasses should override this, to implement any cleanup to be done before disposing.

Implementation

@override
Future<void> onDispose() async {
  for (var executor in _executors) {
    executor.dispose();
  }
  _group.close();
}