Ignore non-actions in enqueue-actions
This commit is contained in:
parent
fe7cff36cb
commit
0ced7c940d
|
@ -99,10 +99,14 @@
|
||||||
-1
|
-1
|
||||||
boot-actions)))
|
boot-actions)))
|
||||||
|
|
||||||
|
(define (event? x) (or (routing-update? x) (message? x)))
|
||||||
|
(define (action? x) (or (event? x) (process? x) (quit? x)))
|
||||||
|
|
||||||
(define (enqueue-actions w pid actions)
|
(define (enqueue-actions w pid actions)
|
||||||
(struct-copy world w
|
(struct-copy world w
|
||||||
[process-actions (queue-append-list (world-process-actions w)
|
[process-actions (queue-append-list (world-process-actions w)
|
||||||
(map (lambda (a) (cons pid a)) (flatten actions)))]))
|
(filter-map (lambda (a) (and (action? a) (cons pid a)))
|
||||||
|
(flatten actions)))]))
|
||||||
|
|
||||||
(define (quiescent? w)
|
(define (quiescent? w)
|
||||||
(and (queue-empty? (world-event-queue w))
|
(and (queue-empty? (world-event-queue w))
|
||||||
|
|
Loading…
Reference in New Issue