ping method

Request that the isolate send response on the responsePort.

void ping(
SendPort responsePort,
{Object response,
int priority: IMMEDIATE}
)

Request that the isolate send response on the responsePort.

If the isolate is alive, it will eventually send response (defaulting to null) on the response port.

The priority must be one of IMMEDIATE or [BEFORE_NEXT_EVENT]. The response is sent at different times depending on the ping type:

If response cannot be sent to the isolate, then the request is ignored. It is recommended to only use simple values that can be sent to all isolates, like null, booleans, numbers or strings.