Update to earlier change making `spawn` exactly 3-ary
This commit is contained in:
parent
6966490f46
commit
1216fba58b
|
@ -53,9 +53,9 @@
|
|||
'()))]
|
||||
[_ #f]))
|
||||
#f
|
||||
(sub (pong ?))
|
||||
(sub 'kickoff)
|
||||
(pub (ping src dst ?))))
|
||||
(patch-seq (sub (pong ?))
|
||||
(sub 'kickoff)
|
||||
(pub (ping src dst ?)))))
|
||||
|
||||
(define (echoer id)
|
||||
(spawn (lambda (e s)
|
||||
|
@ -64,8 +64,8 @@
|
|||
(transition s (message (pong stamp)))]
|
||||
[_ #f]))
|
||||
#f
|
||||
(sub (ping ? ? ?))
|
||||
(pub (pong ?))))
|
||||
(patch-seq (sub (ping ? ? ?))
|
||||
(pub (pong ?)))))
|
||||
|
||||
(begin
|
||||
(run-ground (for/list [(id (in-range echoer-count))] (echoer id))
|
||||
|
|
|
@ -70,9 +70,9 @@
|
|||
(transition s (message (tcp-channel dst src bs)))]
|
||||
[_ #f]))
|
||||
#f
|
||||
(sub (advertise (tcp-channel c server-id ?)))
|
||||
(sub (tcp-channel c server-id ?))
|
||||
(pub (tcp-channel server-id c ?))))
|
||||
(patch-seq (sub (advertise (tcp-channel c server-id ?)))
|
||||
(sub (tcp-channel c server-id ?))
|
||||
(pub (tcp-channel server-id c ?)))))
|
||||
|
||||
(run-ground (spawn-timer-driver)
|
||||
(spawn-tcp-driver)
|
||||
|
|
|
@ -49,9 +49,9 @@
|
|||
'()))]
|
||||
[_ #f]))
|
||||
#f
|
||||
(sub (ping dst src ?))
|
||||
(sub 'kickoff)
|
||||
(pub (ping src dst ?))))
|
||||
(patch-seq (sub (ping dst src ?))
|
||||
(sub 'kickoff)
|
||||
(pub (ping src dst ?)))))
|
||||
|
||||
(define (echoer id)
|
||||
(spawn (lambda (e s)
|
||||
|
@ -60,8 +60,8 @@
|
|||
(transition s (message (ping id src stamp)))]
|
||||
[_ #f]))
|
||||
#f
|
||||
(sub (ping ? id ?))
|
||||
(pub (ping id ? ?))))
|
||||
(patch-seq (sub (ping ? id ?))
|
||||
(pub (ping id ? ?)))))
|
||||
|
||||
(begin
|
||||
(run-ground (for/list [(id (in-range echoer-count))] (echoer id))
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
(transition (+ count 1) '())]
|
||||
[_ #f]))
|
||||
0
|
||||
(pub (presence id))
|
||||
(sub (advertise (presence ?)))))
|
||||
(patch-seq (pub (presence id))
|
||||
(sub (advertise (presence ?))))))
|
||||
|
||||
(define boot-actions (for/list [(id (in-range peer-count))] (peer id)))
|
||||
(define-values (results cpu-time wall-clock-time gc-time)
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
(transition (+ count 1) '())]
|
||||
[_ #f]))
|
||||
0
|
||||
(assert (client))
|
||||
;; (assert (observe (server ?)))
|
||||
))
|
||||
(patch-seq (assert (client))
|
||||
;; (assert (observe (server ?)))
|
||||
)))
|
||||
|
||||
(define (spawn-server id)
|
||||
(spawn (lambda (e count)
|
||||
|
@ -34,8 +34,8 @@
|
|||
(transition (+ count 1) '())]
|
||||
[_ #f]))
|
||||
0
|
||||
;; (assert (server id))
|
||||
(assert (observe (client)))))
|
||||
(patch-seq ;; (assert (server id))
|
||||
(assert (observe (client))))))
|
||||
|
||||
(define client-action (spawn-client))
|
||||
(define server-actions (for/list [(id (in-range (- peer-count 1)))] (spawn-server id)))
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
(transition count '()))]
|
||||
[_ #f]))
|
||||
0
|
||||
(pub (presence id))
|
||||
(sub (advertise (presence ?)))))
|
||||
(patch-seq (pub (presence id))
|
||||
(sub (advertise (presence ?))))))
|
||||
|
||||
(define start-time (current-inexact-milliseconds))
|
||||
(run-ground (for/list [(id (in-range peer-count))] (peer id)))
|
||||
|
|
Loading…
Reference in New Issue