CL-GSERVER.AGENT
make-agent STATE-FUN &OPTIONAL &OPTIONAL SYSTEM → result
STATE-FUN
:
a
T
&OPTIONAL
:
a
T
SYSTEM
:
a
T
result
: a T.
Makes a new `agent' instance. `state-fun' is a function that takes no parameter and provides the initial state of the `agent' as return value.
Optionally an `actor-system' can be specified. If specified the agent will be registered in the `system' and destroyed with it should the actor-system be destroyed. In addition the agent will use the systems shared message dispatcher and will _not_ create it's own.