Skip to content

allow processing of sync actions resulting from state update #1360

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

Conversation

diederich
Copy link
Contributor

Sending an action into the system synchronously from a ViewStore's publisher can result in state updates publishing the wrong, old, value.

This PR fixes it by keeping the Store in sending state while we publish state updates. Once that's done, we check if there were any new actions coming in, in which case we feed them back and start processing again.

diederich and others added 2 commits September 9, 2022 10:34
Sending an action into the system synchronously from a ViewStore's publisher
can result in state updates publishing the wrong, old, value.

This PR fixes it by keeping the `Store` in `sending` state while
we publish state updates. Once that's done, we check if there
were any new actions coming in, in which case we feed them back and
start processing again.
@stephencelis
Copy link
Member

Thanks! Very subtle 😄

@stephencelis stephencelis merged commit 0855c99 into pointfreeco:main Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants