-
Notifications
You must be signed in to change notification settings - Fork 61
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 data race for subscribers property #599
Fix data race for subscribers property #599
Conversation
👷 Deploy request for apollo-ios-docc pending review.Visit the deploys page to approve it
|
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 14 changed, 0 removed
Build ID: e09f794785939e4e7bc17390 URL: https://www.apollographql.com/docs/deploy-preview/e09f794785939e4e7bc17390 |
Thanks for putting up a PR for this fix! Is there more work you are planning for this PR since its in a draft state still? |
@BobaFetters no I just left it in draft because I wasn't sure of the feedback I would get regarding unit tests. |
@tahirmt Gotcha, yea like you said this type of data race is hard to really write a test for so I don't think thats necessary here |
720622da Fix data race for subscribers property (#599) git-subtree-dir: apollo-ios git-subtree-split: 720622da5451f3dc08fb2b90a7b060bfc4f4c6ed
git-subtree-dir: apollo-ios git-subtree-mainline: 872660b git-subtree-split: 720622da5451f3dc08fb2b90a7b060bfc4f4c6ed
@BobaFetters any idea when this will be released? |
@tahirmt Not sure the exact day yet but we will likely do a release later this week once some other pending work is merged in as well. |
@tahirmt We got the other pending work merged so will be going ahead and pushing a new release today |
Fixes apollographql/apollo-ios#3512
This data race can happen if is a start/stop subscription at the same time as a message received on the websocket getting processed. The
subscribers
property is accessed from two threads at the same time causing a crash.I am not really sure how I can add unit tests for this change. The data race type tests are really hard to write.