Commented-out debug-printing in relay.rkt

This commit is contained in:
Tony Garnock-Jones 2018-04-29 16:08:35 +01:00
parent 8ba3779eda
commit 2652147141
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,7 @@
(define inner-facet (current-facet))
(on (asserted (observe (inbound $x)))
;; (log-info "~a (asserted (observe (inbound ~v)))" inner-actor x)
(with-current-facet [outer-actor outer-facet #f]
(define i (skeleton-interest
(term->skeleton x)
@ -68,6 +69,7 @@
(define term (inbound (instantiate-term->value x captured-values)))
(push-script! inner-actor
(lambda ()
;; (log-info "~a (~a) ~v" inner-actor op term)
(match op
['+ (adhoc-assert! inner-actor term)]
['- (adhoc-retract! inner-actor term)]
@ -79,6 +81,7 @@
(for [(captured-values (in-bag cache))]
(define term
(inbound (instantiate-term->value x captured-values)))
;; (log-info "~a (cleanup) ~v" inner-actor term)
(adhoc-retract! inner-actor term))))
(schedule-inner!))))
(hash-set! inbound-endpoints
@ -89,11 +92,13 @@
i))))
(on (retracted (observe (inbound $x)))
;; (log-info "~a (retracted (observe (inbound ~v)))" inner-actor x)
(with-current-facet [outer-actor outer-facet #f]
(remove-endpoint! outer-facet (hash-ref inbound-endpoints x))
(hash-remove! inbound-endpoints x)))
(on (asserted (outbound $x))
;; (log-info "~a (asserted (outbound ~v))" inner-actor x)
(with-current-facet [outer-actor outer-facet #f]
(hash-set! outbound-endpoints
x
@ -103,10 +108,12 @@
#f))))
(on (retracted (outbound $x))
;; (log-info "~a (retracted (outbound ~v))" inner-actor x)
(with-current-facet [outer-actor outer-facet #f]
(remove-endpoint! outer-facet (hash-ref outbound-endpoints x))
(hash-remove! outbound-endpoints x)))
(on (message (outbound $x))
;; (log-info "~a (message (outbound ~v))" inner-actor x)
(with-current-facet [outer-actor outer-facet #f]
(send! x))))