ActorSystem.spawn

Spawn a new stateful actor with the behavior Behavior and state State.

  1. Aid spawn()
  2. Aid spawn(StateT state)
    struct ActorSystem
    spawn
    (
    TActor
    StateT
    Behavior...
    )
    (
    StateT state = StateT.init
    )
    if ()

Parameters

TActor

the messages that the spawned actor must implement behaviors for.

Behavior

behavior for each message.

Return Value

Type: Aid

An Aid representing the new actor.

Meta