September 2019
Beginner
512 pages
12h 52m
English
As pointed out before, the message passed to the compute() function and the return value from it must respect some limitations. Those limitations come from the isolates communication layer. Isolates, as said before, communicate with each other through the messages. These messages are sent and received through SendPort and ReceivePort instances.
To send a message to an isolate port, we first need to obtain a ReceivePort instance corresponding to it. The ReceivePort class exposes a sendPort getter that is bound to the isolate, so we can send messages to it. How does an isolate get ReceivePort from another isolate? It does so through the IsolateNameServer class.
Read now
Unlock full access