kill method

  1. @mustCallSuper
  2. @protected
Future<void> kill(
  1. CancelableAsyncTaskMixin<T> task
)

Implementation

@mustCallSuper
@protected
Future<void> kill(CancelableAsyncTaskMixin<T> task) async {
  final stoppedTask =
      _stopAndReturnReference(task)?.task as CancelableAsyncTaskMixin<T>?;
  if (stoppedTask == null) {
    return;
  }
  await stoppedTask.kill();
  _passEvent(TaskKillEvent<T>(task));
}