Together with SendPort, the only means of communication between isolates.
Together with SendPort, the only means of communication between isolates.
ReceivePorts have a sendPort
getter which returns a SendPort.
Any message that is sent through this SendPort
is delivered to the ReceivePort it has been created from. There, the
message is dispatched to the ReceivePort
's listener.
A ReceivePort is a non-broadcast stream. This means that it buffers incoming messages until a listener is registered. Only one listener can receive messages. See Stream.asBroadcastStream for transforming the port to a broadcast stream.
A ReceivePort may have many SendPorts.