Avoid double-execution within a round; see syndicate-lang/syndicate-js#3
This commit is contained in:
parent
3b4d0ef418
commit
79c3788436
|
@ -41,10 +41,13 @@ class Graph:
|
|||
|
||||
repaired_this_round = repaired_this_round | workset
|
||||
|
||||
updated_subjects = set()
|
||||
for object_id in workset:
|
||||
for subject_id in self.observers_of(object_id):
|
||||
self.forget_subject(subject_id)
|
||||
self.with_subject(subject_id, lambda: repair_fn(subject_id))
|
||||
if subject_id not in updated_subjects:
|
||||
updated_subjects.add(subject_id)
|
||||
self.forget_subject(subject_id)
|
||||
self.with_subject(subject_id, lambda: repair_fn(subject_id))
|
||||
|
||||
__nextFieldId = 0
|
||||
|
||||
|
|
Loading…
Reference in New Issue