Requests the isolate to pause.
The isolate should stop handling events by pausing its event queue. The request will eventually make the isolate stop doing anything. It will be handled before any other messages that are later sent to the isolate from the current isolate, but no other guarantees are provided.
The event loop may be paused before previously sent, but not yet exeuted, messages have been reached.
If resumeCapability
is provided, it is used to identity the pause,
and must be used again to end the pause using resume.
Otherwise a new resume capability is created and returned.
If an isolate is paused more than once using the same capability, only one resume with that capability is needed to end the pause.
If an isolate is paused using more than one capability, they must all be individully ended before the isolate resumes.
Returns the capability that must be used to resume end the pause.
Source
Capability pause([Capability resumeCapability]) {
if (resumeCapability == null) resumeCapability = new Capability();
_pause(resumeCapability);
return resumeCapability;
}