Messaging to non-existent actors

Category |  Purpose |  Intended Audience |  Applicable to |  Description |  Limitations |  See also


Category:

Top

Toolset


Purpose:

Top

To describe the rules of messaging across unbounded ports(or ports connected to actors which are not incarnated).


Intended Audience:

Top

All ObjecTime developers


Applicable to:

Top

All Versions


Description:

Top

If a message is sent to an actor before it is initialized, will the message be held on a queue somewhere? What happens if the actor is never instantiated?

No queueing is done if the actor is not incarnated - the send simply fails.

If you have a port which is connected to an optional actor, the binding is established once the optional actor is incarnated. If you try to send on this port before the actor has been incarnated, the send will fail (send will return 0).

Once the incarnate() has been done, the message should be queued (even if the receiving actor has not been initialized yet). If it is not, then something may be wrong. You should check the send return code. If it fails even after the actor is incarnated, in the TargetRTS you can try printing the result of context()->strerror() to see what the RTS says (e.g. printf("Error: \n",context()->strerror(); )


Limitations:

Top

strerror() is not supported in the SimulationRTS


See also:

Top

None


 

Copyright © 1999, ObjecTime Limited.