Next: Ward, Previous: Swappable, Up: actor-lib: A standard library of sorts [Contents][Index]
The (goblins actor-lib ticker) module provides a mechanism to
invoke certain actors at the same time each “tick” of a program.
Spawn and return a reference to a ticker actor which holds
references to a set of actors which it invokes with the same set of
arguments each “tick”.
A ticker has four methods:
to-tick: Return a procedure accepting a single argument, a
closure over spawning an actor with a ticky actor as an
argument. The ticky actor is passed to the closure and has
three procedures:
die: Set dead? to #t.
dead?: Return #t if die has been invoked, else
#f.
to-tick: The same as the to-tick method of ticker.
get-ticked: Return a list holding references to each actor to
tick.
tick: Invoke all actors which have a ticky.
foldr proc init [#:include-new? #t]: A foldr procedure
over the actors known to ticker. If include-new? is
#t, also operate on actors registered since the last invocation
of tick.