Ignore non-actions in enqueue-actions

This commit is contained in:
Tony Garnock-Jones 2013-10-28 10:55:31 +00:00
parent fe7cff36cb
commit 0ced7c940d
1 changed files with 5 additions and 1 deletions

View File

@ -99,10 +99,14 @@
-1
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)
(struct-copy world 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)
(and (queue-empty? (world-event-queue w))