You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found an interesting thing while porting your excellent library to C#. When AutoObservable checks if any of the subscriptions has actually changed it breaks earlier and skips checking other dependencies, which sounds logical... However hasChanged in the current revision also updates the revision and value for a Subscription, and if we only do that for the first changed dependency and skip all other, the subsValid will return false and we'll need a second loop iteration.
At first I was thinking that the correct fix would be to simply remove break here, however after some investigation, I think it's even better to update Subscription.lastRev on reuse. What do you think?
I've found an interesting thing while porting your excellent library to C#. When
AutoObservable
checks if any of the subscriptions has actually changed it breaks earlier and skips checking other dependencies, which sounds logical... HoweverhasChanged
in the current revision also updates the revision and value for aSubscription
, and if we only do that for the first changed dependency and skip all other, thesubsValid
will returnfalse
and we'll need a second loop iteration.At first I was thinking that the correct fix would be to simply remove
break
here, however after some investigation, I think it's even better to updateSubscription.lastRev
onreuse
. What do you think?tink_state/src/tink/state/internal/AutoObservable.hx
Line 255 in 58eacef
The text was updated successfully, but these errors were encountered: