Make box-and-client work better with raco test
This commit is contained in:
parent
d648af920a
commit
6a0bcb1246
|
@ -4,6 +4,7 @@
|
||||||
(struct set-box (new-value) #:prefab)
|
(struct set-box (new-value) #:prefab)
|
||||||
(struct box-state (value) #:prefab)
|
(struct box-state (value) #:prefab)
|
||||||
|
|
||||||
|
(module+ main
|
||||||
(actor-system/dataspace (ds)
|
(actor-system/dataspace (ds)
|
||||||
(spawn #:name 'box
|
(spawn #:name 'box
|
||||||
(define-field current-value 0)
|
(define-field current-value 0)
|
||||||
|
@ -23,4 +24,4 @@
|
||||||
(log-info "client: learned that box's value is now ~v" v)
|
(log-info "client: learned that box's value is now ~v" v)
|
||||||
(send! ds (set-box (+ v 1))))
|
(send! ds (set-box (+ v 1))))
|
||||||
(when (retracted (box-state _))
|
(when (retracted (box-state _))
|
||||||
(log-info "client: box state disappeared")))))
|
(log-info "client: box state disappeared"))))))
|
||||||
|
|
Loading…
Reference in New Issue