Avoid double-execution within a round; see syndicate-lang/syndicate-js#3
This commit is contained in:
parent
16763a8b4f
commit
f785274e35
|
@ -54,11 +54,14 @@
|
|||
(define workset (dataflow-graph-damaged-nodes g))
|
||||
(when (not (hash-empty? workset))
|
||||
(set-dataflow-graph-damaged-nodes! g (hash))
|
||||
(define updated (make-hash))
|
||||
(hash-for-each workset
|
||||
(lambda (object-id _)
|
||||
(for [(subject-id
|
||||
(in-hashset-values (dataflow-graph-edges-forward g) object-id))]
|
||||
(dataflow-forget-subject! g subject-id)
|
||||
(parameterize ((current-dataflow-subject-id subject-id))
|
||||
(repair-node! subject-id)))))
|
||||
(when (not (hash-has-key? updated subject-id))
|
||||
(hash-set! updated subject-id #t)
|
||||
(dataflow-forget-subject! g subject-id)
|
||||
(parameterize ((current-dataflow-subject-id subject-id))
|
||||
(repair-node! subject-id))))))
|
||||
(loop))))
|
||||
|
|
Loading…
Reference in New Issue