Skip to content
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 race condition #173

Merged
merged 2 commits into from
Dec 5, 2019
Merged

Fix race condition #173

merged 2 commits into from
Dec 5, 2019

Conversation

shuding
Copy link
Member

@shuding shuding commented Dec 4, 2019

Make sure mutate, revalidate and trigger won't be ignored because of deduping and race conditions:

+------------------------------------------------------->A
ongoing request                                         stale response
       +-------------------------------------->B
       revalidate                             latest data

It should show B but the result is overridden by A, which is wrong. The sequence of responses should be ordered increasingly, by the start time of the corresponding requests.

Fix #153.

@pacocoursey pacocoursey merged commit 05779e6 into master Dec 5, 2019
@pacocoursey pacocoursey deleted the fix-race-condition branch December 5, 2019 16:54
@shuding shuding mentioned this pull request Dec 5, 2019
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.

revalidateOnFocus error
2 participants