Remove actor-alive?.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 9 Aug 2017 17:40:30 +0000 (12:40 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Wed, 9 Aug 2017 17:40:30 +0000 (12:40 -0500)
`actor-alive?' was actully returning the boolean opposite of what it
should have.  It turns out we don't need it anyway, so removed.

* 8sync/actors.scm (condition-signalled?, actor-alive?): Removed.
* 8sync/repl.scm (repl-manager-main-loop): Just loop on #t, since
daydream won't resume anyway if our actor dies.

8sync/actors.scm
8sync/repl.scm

index 2dcc310a7b24baa3cd017dd456e9a6676daf43fb..fc8afcad3a6200550ae90396aff05881cd6fff5f 100644 (file)
@@ -58,8 +58,6 @@
 
             actor-init! actor-cleanup!
 
-            actor-alive?
-
             build-actions
 
             define-actor
@@ -672,14 +670,3 @@ its '*cleanup* action handler."
   (*actor-prompt* #f)
   (actor-cleanup! actor))
 
-;; From a patch I sent to Fibers...
-(define (condition-signalled? cvar)
-  "Return @code{#t} if @var{cvar} has already been signalled.
-
-In general you will want to use @code{wait} or @code{wait-operation} to
-wait on a condition.  However, sometimes it is useful to see whether or
-not a condition has already been signalled without blocking."
-  (atomic-box-ref ((@@ (fibers conditions) condition-signalled?) cvar)))
-
-(define (actor-alive? actor)
-  (condition-signalled? (address-dead? (actor-id actor))))
index 46f7cfd78012988685742fc40cdbf6b3a7977a23..4cf60b255df6b4b85031a6bed9b3e0d670b609fa 100644 (file)
@@ -63,7 +63,7 @@
        (<- subscriber 'repl-update))
      (.subscribers repl-manager)))
   (set! (.socket repl-manager) socket)
-  (while (actor-alive? repl-manager)
+  (while #t
     (daydream (.poll-every repl-manager))
     (poll-coop-repl-server server)
     (inform-subscribers)))