X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=8sync%2Factors.scm;h=b00329d32ab1fc489fae13ed46c9a3be258cdf4d;hb=cd32bbe822f4e3acbb755993d3bd39358c176a26;hp=6d17e0597d9bab86bdaf86b6f85bd34fbd7179a5;hpb=a0e0735ebf3f184b4f105cad1af5757ecd08e2e4;p=8sync.git diff --git a/8sync/actors.scm b/8sync/actors.scm index 6d17e05..b00329d 100644 --- a/8sync/actors.scm +++ b/8sync/actors.scm @@ -196,16 +196,13 @@ (big-random-number-string)) #f)) -;; TODO: this should abort to the prompt, then check for errors -;; when resuming. - (define (<-wait to action . args) (define prompt (*actor-prompt*)) (when (not prompt) (error "Tried to <-wait without being in an actor's context...")) (let ((reply (abort-to-prompt prompt '<-wait to action args))) - (cond ((eq? action '*error*) + (cond ((eq? (message-action reply) '*error*) (throw 'hive-unresumable-coroutine "Won't resume coroutine; got an *error* as a reply" #:message reply)) @@ -372,10 +369,9 @@ and handling them." (lambda vals ;; Return reply if necessary (when (message-wants-reply message) - (when (message-wants-reply message) - (%<- #f actor (message-from message) '*reply* - vals ((actor-msg-id-generator actor)) - (message-id message))))))) + (%<- #f actor (message-from message) '*reply* + vals ((actor-msg-id-generator actor)) + (message-id message)))))) (const #t) (let ((err (current-error-port))) (lambda (key . args)