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