-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Behaviour When Mixing Dispatch and Dispatch Sync #35
Comments
Thanks for reporting this. I’m on vacation now, will take a look later. |
I've been bitten by the same root cause of this problem just today. For Makes me think that there's a problem of predictability and/or coherence, or at least a documentation problem. If code needs to be changed, I don't know how to make it non-breaking. |
I think with the the recent citrus/src/citrus/reconciler.cljs Lines 104 to 114 in 8ed6d0e
Specifically citrus/src/citrus/reconciler.cljs Lines 46 to 54 in 8ed6d0e
I guess this is a breaking change in some ways and we will document this in the release notes. |
Hi, I brought this up on the slack, but it got lost due to no history.
There is some surprising behaviour when mixing dispatch and dispatch sync.
The output of this is
and then if you print the reconciler once its all run
The apparent behaviour is that first the update from the
dispatch!
isn't reflected in the subsequentdispatch-sync!
method calls. However if you then check the state of the reconciler its only the result of thedispatch!
that is reflected.If you change
effect
todispatch!
as well, like soyou get the following output
So which indicates the "bug" is when you switch between
dispatch!
anddispatch-sync!
If you flip the problem and start from a
dispatch-sync!
and go todispatch!
it appears to work as expected.Output:
Wanted to raise this, even if the answer is simply a warning about mixing dispatch and dispatch-sync.
The text was updated successfully, but these errors were encountered: