-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing change callbacks short circuiting
The graph_shortcircuit test was flaky in that the quadrupled.for_each_cloned callback could happen after quadrupled was set to 16, and the short circuiting of the original call chain prevented the changes from propagating because when the callback executed it observed 16 not the originally expected 4. The original callbacks queued up by setting quadrupled to 16 would fire, but PartialEq on the set operation would prevent the change callbacks from firing, causuing the chain to be out of sync. Since the PartialEq requirements on various APIs are designed to prevent infinite cycle updates, it seems silly to also try to short circuit in the graph as well. And, I couldn't come up with a reasonable approach to solving this problem that I would expect end-users to also apply. So, this may lead to situations where infinite callback loops can happen if logic does not prevent it. However, that seems a lot easier to reason about as opposed to "why did these updates never fire?"
- Loading branch information
Showing
1 changed file
with
40 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters