terminate method

  1. @override
void terminate([
  1. TaskTerminatedException? ex
])
inherited

Terminates this worker.

Implementation

@override
void terminate([TaskTerminatedException? ex]) {
  // terminate channel and stop worker
  ex ??= TaskTerminatedException('Worker has been terminated');
  _channel?.terminate(ex);
  stop();
}