kill method

Requests the isolate to shut down.

void kill(
{int priority: BEFORE_NEXT_EVENT}
)

Requests the isolate to shut down.

The isolate is requested to terminate itself. The priority argument specifies when this must happen.

The priority must be one of IMMEDIATE or [BEFORE_NEXT_EVENT]. The shutdown is performed at different times depending on the priority: