-
Notifications
You must be signed in to change notification settings - Fork 85
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
Fix ending a stream while updating #229
base: master
Are you sure you want to change the base?
Conversation
058c3c7
to
84df52d
Compare
@paldepind I currently have permissions to merge to the repo, but I'm not able to publish |
84df52d
to
6e791f3
Compare
Thanks for fixing this @nordfjord. I'll look at the PR soon 🙂 Please share your npm username then I'll also add you to the npm package to give you publish rights 🙂 |
Awesome, thanks mate! My npm username is also |
Thank you for looking into this @nordfjord! I haven't completely understood the issue yet. But, I wonder if the test could be simplified further? Do the details inside |
Absolutely, I've attempted to whittle it down now! I'm honestly not sure how to communicate the issue, the dataflow to trigger it is quite strange |
Fixes #228 which highlighted an edge case that happens when a stream is ended while being processed in very specific circumstances. In those circumstances the end stream will be triggered before the listeners because it's updated is queued before the listener updates.
To solve for this we add a
toEnd
array into which the end stream of the current stream will be pushed to if it's updated while while the main stream is updated (that's a convoluted sentence, it's a convoluted data flow, not sure how to communicate this properly)