Previous: Actormap objects, Up: Actormaps [Contents][Index]
As already shown, before using objects in an actormap, one must first create those objects in the context of that actormap:
Spawn an actor inside actormap, but do not commit the transaction. Return a reference to the spawned object and a transactormap.
Like actormap-spawn
, but do commit the transaction.
Once objects have been put into an actormap, they may be invoked to perform some action or other. There are several ways to do this, falling into one of two general categories: turns and churns. A turn can be thought of as the performance of a single action, or the processing of a single message. A churn is best understand in terms of a turn as all turns a given actormap can handle without invoking far objects.
Perform a single turn in actormap by invoking to-refr with the list of arguments args. Return the result of the invoked behavior, a new actormap, and a list of new messages generated by the turn.
Like actormap-turn*
, but create a new generation of
transaction with actormap as the parent and operate in it
instead.
Return the result of msg in the context of actormap. How to handle errors and transactions is controlled by keyword args:
#t
, operate within actormap instead
of creating a new generation; otherwise, create a new generation.
#t
, capture the stack and abort to a
prompt; otherwise, propagate the error.
Perform a turn in actormap only to return the results; do not commit the transaction to the transaction history.
Perform a turn in actormap and commit the results, but ignore any messages generated by it. Return the results.
Like actormap-poke!
, but commit the results to the current
transaction generation without creating a new one. This voids
Goblin’s transactionality guarantees like time travel.
Execute thunk in actormap, but do not commit the results. Return the results.
Like actormap-run
, and commit the results. If reckless?
is #t
, do not create a new generation for the turn.
Like actormap-run
, and return a reference to the new
actormap as well as any messages generated.
Perform every turn in am possible without needing to invoke far objects to resolve msg, then dispatch messages to the appropriate far objects.
#f
, do not handle errors.
#f
, operate and commit in
am instead of creating a new generation.
Evaluate thunk in the context of actormap, performing all
possible local invocations to resolve thunk. If
catch-errors?
is #f
, do not handle errors. Return the
results, a reference to the new actormap, and any messages generated.
Like actormap-churn-run
, but dispatch messages and only return
the results of the churn.
When performing any action in a transactormap, one may wish to (but, as has been shown, does not have to) commit the changes to the generational history of the overarching actormap.
Commit the changes in transactormap to the generational history.
Commit the changes in transactormap to its parent.
Previous: Actormap objects, Up: Actormaps [Contents][Index]