Skip to content

Message Forwarding #9

@ognen

Description

@ognen

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

ref !<< msg

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions