ping method - Isolate class - dart:isolate library (original) (raw)

void ping(

  1. SendPort responsePort, {
  2. Object? response,
  3. int priority = immediate, })

Requests that the isolate send response on the responsePort.

The response object must follow the same restrictions as enforced bySendPort.send when sending to an isolate from another isolate group; only simple values that can be sent to all isolates, like null, booleans, numbers or strings, are allowed.

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 beforeNextEvent. The response is sent at different times depending on the ping type:

Implementation

external void ping(
  SendPort responsePort, {
  Object? response,
  int priority = immediate,
});