Connections
Connected actors send each other Exit signals and terminate together unless they are made :sticky with trapExit:
Actors.connect — Functionconnect(lk::Link)Create a connection between the calling actor and the actor represented by lk.
Connected actors will send each other Exit signals. A connected actor will exit with the signaled reason unless it is :normal.
Note:
- An actor can be made
:stickywithtrapExitand then will not exit. - If this is called from the
Mainscope,lkis
connected to the Actors._ROOT actor.
Actors.disconnect — Functiondisconnect(lk::Link)Remove the connection between the calling actor and the actor represented by lk.
Note: If this is called from the Main scope, lk is disconnected from the _ROOT actor.
Actors.trapExit — FunctiontrapExit(lk::Link=self(), mode=:sticky)Change the mode of an actor.
A :sticky actor does not exit if it receives an Exit signal from a connected actor and does not propagate it further. Instead it reports the failure and saves a link to the failed actor.
See diag for getting links to failed actors from a :sticky actor.