Message passing in SALSA is implemented by asynchronous message delivery with dynamic method invocation. The following example shows how an actor sends a message to itself. Note that it is not a JAVA method invocation:
handler(); // equivalent to "self <- handler();" |
// send a method println() with an argument "Hello World",
// to the actor standardOutput.
standardOutput <- println("Hello World");
|
// Wrong! It does not compile!!! self <- someObject.someHandler(); |