CL-GSERVER.ACTOR-CONTEXT
actor-of CONTEXT CREATE-FUN &KEY &KEY DISPATCH-TYPE QUEUE-SIZE → result
CONTEXT
:
a
T
CREATE-FUN
:
a
T
&KEY
:
a
T
DISPATCH-TYPE
:
a
T
QUEUE-SIZE
:
a
T
result
: a T.
Creates and adds actors to the given context.
Both an `actor-system' and an `actor' are composed of an `actor-context'. When an `actor-system' is specified as context (`actor-system' implements parts of the protocol) then the new actor will be a new root actor.
When th new actor should be a child of another actor, then the `actor-context' of the (to be) parent `actor' should be specified. Creating an actor via `actor-of' will also add the `actor-context' as watcher of the actor. This watching can be used for different purposes. Right now the `actor' is removed from the context when it was stopped.
Specify the dispatcher type (`disp-type') as either: `:shared' to have this actor use the shared message dispatcher of the context `:pinned' to have this actor run it's own message box thread (faster, but more resource are bound.)
Specify `queue-size' with: 0: for a unbounded queue >0: for a bounded queue (preferably a size > 100)