From fe47abd540ca7278dbf41f802bf3d2729a056b3b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 10 Aug 2016 19:14:01 -0400 Subject: [PATCH] Cosmetic --- racket/syndicate/examples/actor/queue-no-credit.rkt | 3 +-- racket/syndicate/examples/actor/queue-no-credit2.rkt | 4 +--- racket/syndicate/examples/actor/queue.rkt | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/racket/syndicate/examples/actor/queue-no-credit.rkt b/racket/syndicate/examples/actor/queue-no-credit.rkt index db72b5d..dc2c9dc 100644 --- a/racket/syndicate/examples/actor/queue-no-credit.rkt +++ b/racket/syndicate/examples/actor/queue-no-credit.rkt @@ -47,8 +47,7 @@ (define/query-set subscribers (subscription queue-id $who) who #:on-add (enq! waiters who)) - (on (message (delivery $who queue-id $body)) - (enq! messages body)) + (on (message (delivery $who queue-id $body)) (enq! messages body)) (begin/dataflow (when (and (not (queue-empty? (waiters))) diff --git a/racket/syndicate/examples/actor/queue-no-credit2.rkt b/racket/syndicate/examples/actor/queue-no-credit2.rkt index d837a3f..55e99da 100644 --- a/racket/syndicate/examples/actor/queue-no-credit2.rkt +++ b/racket/syndicate/examples/actor/queue-no-credit2.rkt @@ -46,9 +46,7 @@ (on (asserted (subscription queue-id $who)) (enq! waiters who)) (on (retracted (subscription queue-id $who)) (waiters (queue-remove who (waiters)))) - - (on (message (delivery $who queue-id $body)) - (enq! messages body)) + (on (message (delivery $who queue-id $body)) (enq! messages body)) (begin/dataflow (when (and (not (queue-empty? (waiters))) diff --git a/racket/syndicate/examples/actor/queue.rkt b/racket/syndicate/examples/actor/queue.rkt index 2eaafb7..9682df4 100644 --- a/racket/syndicate/examples/actor/queue.rkt +++ b/racket/syndicate/examples/actor/queue.rkt @@ -64,7 +64,7 @@ (not (queue-empty? (messages)))) (define who (deq! waiters)) (define old-credit (hash-ref (credits) who 0)) - (when (positive? old-credit) + (when (positive? old-credit) ;; lazily remove entries from waiters (define new-credit (- old-credit 1)) (credits (hash-set (credits) who new-credit)) (when (positive? new-credit) (enq! waiters who))