Class actor

Package:

CL-GSERVER.ACTOR

Class Precedence List:

ACTOR → ACTOR-CELL ... → T

Slots:

RECEIVE
Initarg: RECEIVE
Initform: (ERROR 'receive' must be specified!)
`receive' is a function that has to take 3 parameters: - `self': the actor instance - `msg': the received message - `state': the current state of the actor The `sender' of the message, if available, is accessible with `*sender*'.
BEHAVIOR
Behavior function applied via `become' and reverted via `unbecome' `behavior' function takes the same parameters as `receive'.
CONTEXT
WATCHERS
Initform: 'NIL
List of watchers of this actor.

Description:

This is the `actor' class. The `actor' does it's message handling using the `receive' function. There is asynchronous `tell' (no response) and synchronous `ask-s' and asynchronous `ask' (with response). To stop an actors message processing in order to cleanup resouces you should tell (either `tell' or `ask-s') the `:stop' message. It will respond with `:stopped' (in case of `ask[-s]').