printf to log-info; clean up demo output
This commit is contained in:
parent
4c4afc6b6e
commit
5d6e0f3904
|
@ -358,7 +358,7 @@
|
||||||
(stop-facet! (current-dataspace)
|
(stop-facet! (current-dataspace)
|
||||||
(current-facet-id)
|
(current-facet-id)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "box: terminating\n"))))
|
(log-info "box: terminating"))))
|
||||||
(void))
|
(void))
|
||||||
#f)
|
#f)
|
||||||
(add-endpoint! (current-dataspace)
|
(add-endpoint! (current-dataspace)
|
||||||
|
@ -378,7 +378,7 @@
|
||||||
(schedule-script!
|
(schedule-script!
|
||||||
(current-dataspace)
|
(current-dataspace)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "new-value ~a ~v\n" op new-value)
|
(log-info "box: taking on new-value ~v" new-value)
|
||||||
(current-value new-value))))))))))
|
(current-value new-value))))))))))
|
||||||
(add-actor! ds
|
(add-actor! ds
|
||||||
(lambda ()
|
(lambda ()
|
||||||
|
@ -396,7 +396,7 @@
|
||||||
(current-dataspace)
|
(current-dataspace)
|
||||||
(current-facet-id)
|
(current-facet-id)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "client: box has gone\n"))))))))
|
(log-info "client: box has gone"))))))))
|
||||||
(add-endpoint! (current-dataspace)
|
(add-endpoint! (current-dataspace)
|
||||||
'on-asserted-box-state
|
'on-asserted-box-state
|
||||||
(lambda () (observe (box-state (capture (discard)))))
|
(lambda () (observe (box-state (capture (discard)))))
|
||||||
|
@ -410,16 +410,16 @@
|
||||||
(schedule-script!
|
(schedule-script!
|
||||||
(current-dataspace)
|
(current-dataspace)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(printf "v ~a ~v\n" op v)
|
(log-info "client: learned that box's value is now ~v" v)
|
||||||
(dataspace-send! (current-dataspace)
|
(dataspace-send! (current-dataspace)
|
||||||
(set-box (+ v 1))))))))))))
|
(set-box (+ v 1))))))))))))
|
||||||
|
|
||||||
(require racket/pretty)
|
(require racket/pretty)
|
||||||
(pretty-print ds)
|
;; (pretty-print ds)
|
||||||
(let loop ((i 0))
|
(let loop ((i 0))
|
||||||
(printf "--- i = ~v\n" i)
|
;; (printf "--- i = ~v\n" i)
|
||||||
(when (run-scripts! ds)
|
(when (run-scripts! ds)
|
||||||
(pretty-print ds)
|
;; (pretty-print ds)
|
||||||
(loop (+ i 1))))
|
(loop (+ i 1))))
|
||||||
(pretty-print ds)
|
;; (pretty-print ds)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue