Implement ActorRef.forward. The method should allow message forwarding, i.e.
// within an actor method
func receive(msg: Any) {
let ref: ActorRef = // ...
ref.forward(msg: msg)
}
In this case, the actor behind ref will receive the message with the original sender rather than the actor that forwards it (as it would happen if one goes for ref.tell(msg). The call is equivalent to
ref.tell(msg: msg, sender: sender)
executed in an actor's receive method.
ActorRef.tell(msg:sender:) should be made internal to the project.
A forwarding operator might also be added, e.g. !<<, as in
Implement
ActorRef.forward. The method should allow message forwarding, i.e.In this case, the actor behind
refwill receive the message with the original sender rather than the actor that forwards it (as it would happen if one goes forref.tell(msg). The call is equivalent toexecuted in an actor's receive method.
ActorRef.tell(msg:sender:)should be made internal to the project.A forwarding operator might also be added, e.g.
!<<, as in