pause method
void
pause()
Requests the isolate to pause.
When the isolate receives the pause command, it stops processing events from the event loop queue. It may still add new events to the queue in response to, e.g., timers or receive-port messages. When the isolate is resumed, it starts handling the already enqueued events.
The pause request is sent through the isolate's command port, which bypasses the receiving isolate's event loop. The pause takes effect when it is received, pausing the event loop as it is at that time.
To resume this worker call resume method
Implementation
void pause() => isolate.pause(isolate.pauseCapability);