SendPort responsePort
) Asks the isolate to send a message on responsePort
when it terminates.
WARNING: This method is experimental and not handled on every platform yet.
The isolate will send a null
message on responsePort
as the last
thing before it terminates. It will run no further code after the message
has been sent.
If the isolate is already dead, no message will be sent.
Source
/**
* Asks the isolate to send a message on [responsePort] when it terminates.
*
* WARNING: This method is experimental and not handled on every platform yet.
*
* The isolate will send a `null` message on [responsePort] as the last
* thing before it terminates. It will run no further code after the message
* has been sent.
*
* If the isolate is already dead, no message will be sent.
*/
/* TODO(lrn): Can we do better? Can the system recognize this message and
* send a reply if the receiving isolate is dead?
*/
external void addOnExitListener(SendPort responsePort);