From: Christopher Allan Webber Date: Wed, 9 Aug 2017 17:40:30 +0000 (-0500) Subject: Remove actor-alive?. X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=092b40c1c8c9c45926113fbabd542d3186244367;p=8sync.git Remove actor-alive?. `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. --- diff --git a/8sync/actors.scm b/8sync/actors.scm index 2dcc310..fc8afca 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -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)))) diff --git a/8sync/repl.scm b/8sync/repl.scm index 46f7cfd..4cf60b2 100644 --- a/8sync/repl.scm +++ b/8sync/repl.scm @@ -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)))