actors: Rename actor-am-i-alive? to actor-alive?.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 21:15:59 +0000 (15:15 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 2 Jan 2017 21:15:59 +0000 (15:15 -0600)
* 8sync/actors.scm (actor-alive?): Rename from actor-am-i-alive?.
* 8sync/actors.scm:
* 8sync/repl.scm:
* doc/8sync-new-manual.org: Update all references to actor-alive?.

8sync/actors.scm
8sync/repl.scm
doc/8sync-new-manual.org

index 9a0bb30f18488019cef1ebba7b64fb5ea4d098e9..2c9870ce26aef93a51655e4206772dd632fce4f3 100644 (file)
@@ -47,7 +47,7 @@
             actor-id-hive
             actor-id-string
 
-            actor-am-i-alive?
+            actor-alive?
 
             build-actions
 
@@ -358,7 +358,7 @@ to come after class definition."
 (define %current-actor
   (make-parameter #f))
 
-(define (actor-am-i-alive? actor)
+(define (actor-alive? actor)
   (hive-resolve-local-actor (actor-hive actor) (actor-id actor)))
 
 
index 16e246699fe1af49573ddb221ba7bbce839cdda3..006540367dcea540a8046bff154f17264e6f0770 100644 (file)
@@ -52,7 +52,7 @@
   (define server
     (spawn-coop-repl-server socket))
   (set! (repl-manager-socket repl-manager) socket)
-  (while (actor-am-i-alive? repl-manager)
+  (while (actor-alive? repl-manager)
     (poll-coop-repl-server server)
     (8sleep (repl-manager-poll-every repl-manager))))
 
index 1caa79b8ccb15adfa5e52c4c46c17b7a9ee5ddae..d0a99673891d0482bb522d00370574522f332bb9 100644 (file)
@@ -567,7 +567,7 @@ How about an actor that start sleeping, and keeps sleeping?
                            (loop sleeper-loop))))
 
   (define (sleeper-loop actor message)
-    (while (actor-am-i-alive? actor)
+    (while (actor-alive? actor)
       (display "Zzzzzzzz....\n")
       ;; Sleep for one second
       (8sleep 1)))
@@ -588,7 +588,7 @@ In our sleeper-loop we also see a call to "8sleep".
 "8sleep" is like Guile's "sleep" method, except it is non-blocking
 and will always yield to the scheduler.
 
-Our while loop also checks "actor-am-i-alive?" to see whether or not
+Our while loop also checks "actor-alive?" to see whether or not
 it is still registered.
 In general, if you keep a loop in your actor that regularly yields
 to the scheduler, you should check this.
@@ -645,7 +645,7 @@ reference other actors.
     ""
     (set! (worker-task-left worker) difficulty)
     (display "worker> Whatever you say, boss!\n")
-    (while (and (actor-am-i-alive? worker)
+    (while (and (actor-alive? worker)
                 (> (worker-task-left worker) 0))
       (display "worker> *huff puff*\n")
       (set! (worker-task-left worker)
@@ -715,7 +715,7 @@ into a micromanager.
       (if still-working
           (begin (display "manager> Harumph!\n")
                  (8sleep 1)
-                 (when (actor-am-i-alive? manager)
+                 (when (actor-alive? manager)
                    (manager-micromanage-loop manager)))
           (begin (display "manager> Oh!  I guess you can go home then.\n")
                  (<- manager (manager-direct-report manager) 'go-home)))))