actors: Add auto-init feature to actors.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 4 Jan 2017 01:57:50 +0000 (19:57 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 4 Jan 2017 02:22:43 +0000 (20:22 -0600)
commit063be529581b7004dae5ecb106bcf33729b9fef7
tree402e1e46ce6a8c97a3db08f652354d639aa7219c
parent61fed4138184d12cfcdca93035492119999dfa48
actors: Add auto-init feature to actors.

* 8sync/actors.scm (<actor>): Add '*init* action to actions slot.
(<hive>, hive-handle-init-all): Add '*init-all* action.
(hive-handle-cleanup-all): Adjust comment.
(%hive-create-actor): Add send-init? argument, and when supplied
call <-wait on the actor's '*init* method.
(bootstrap-actor, bootstrap-actor*): Rename from hive-create-actor,
hive-create-actor*.  Switch init argument to init-args and pass in #f to
%hive-create-actor's send-init? argument.
(create-actor, create-actor*): Switch init argument to init-args
and pass in #t to %hive-create-actor's send-init? argument.
(run-hive): Add '*init-all* action call to the hive on the initial
queue.

* 8sync/debug.scm (bootstrap-actor-gimmie, bootstrap-actor-gimmie*):
Rename from hive-create-actor-gimmie, hive-create-actor-gimmie*.

* demos/actors/botherbotherbother.scm:
* demos/actors/robotscanner.scm:
* demos/actors/simplest-possible.scm:
* demos/ircbot.scm:
* doc/8sync-new-manual.org:
* tests/test-actors.scm: Change calls from hive-create-actor to
bootstrap-actor.

* tests/test-actors.scm: Add actor *init*'ing tests.
8sync/actors.scm
8sync/debug.scm
demos/actors/botherbotherbother.scm
demos/actors/robotscanner.scm
demos/actors/simplest-possible.scm
demos/ircbot.scm
doc/8sync-new-manual.org
tests/test-actors.scm