Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt at a more formal solution to problems such as
triggering a DimensionMismatch error due to
input1
executing first. The current solution to this is to write to the Observable directly withinput1.val = [1, 2, 3]
first, and then trigger an update with the second observable as usual.While that works it requires you to modify a field of the observable which isn't great in my opinion. In a more complex network of observables you may also need to trigger both observables to run everything you need, which will double up on updates attached to both.
This pr is adding a different way to handle this:
which lowers to
This will update
observable.val
and mark listeners as out-of-date viaprepare_update!
and then update them throughexecute_update!
. The latter will skip over listeners that have already been executed and exit when it hits a consuming listener (consuming now or before). So it is effectively the same asexcept that it skips duplicate execution of listeners.
TODO: