Main submodule in go.rkt

This commit is contained in:
Tony Garnock-Jones 2021-05-31 13:07:37 +02:00
parent a06b9d188a
commit d4af09e1b9
1 changed files with 9 additions and 7 deletions

View File

@ -100,10 +100,12 @@
(for [(peer (in-hash-keys (hash-ref subscriptions (record-label message) '#hash())))]
(turn-message! turn peer message))))))
(actor-system
(lambda (turn)
(actor-daemon! (facet-actor (turn-active-facet turn)) #t)
(define disarm (facet-prevent-inert-check! (turn-active-facet turn)))
(define ds (turn-ref turn (dataspace)))
(turn-spawn! turn (box ds 500000 100000))
(turn-spawn! turn (client ds))))
(module+ main
(time
(actor-system
(lambda (turn)
(actor-daemon! (facet-actor (turn-active-facet turn)) #t)
(define disarm (facet-prevent-inert-check! (turn-active-facet turn)))
(define ds (turn-ref turn (dataspace)))
(turn-spawn! turn (box ds 500000 100000))
(turn-spawn! turn (client ds))))))