terminate method

  1. @override
void terminate({
  1. bool force = false,
})
override

Requests to terminate the execution of a computation.

Parameters:

  • force: Determines whether the execution of the computation will be terminate immediately or when control is yielded back to the event loop.

Implementation

@override
void terminate({bool force = false}) {
  _isTerminationRequested = true;
  _isolate?.kill(
      priority: force ? Isolate.immediate : Isolate.beforeNextEvent);
}