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

Make locationManager initialization thread safe #317

Merged
merged 3 commits into from
Sep 29, 2021
Merged

Conversation

S2Ler
Copy link
Contributor

@S2Ler S2Ler commented Sep 28, 2021

Fixes #316

There are three data-races found during running sendTurnstileEvent multiple times:

  • MMELocationManager
  • MMEMetricsManager
  • MMEUniqueIdentifier

All these classes modify shared state which is accessed from multiple Dispatch Queue threads due to how sendTurnstileEvent is implemented.

Alternative solution can be running sendTurnstileEvent only one at a time.

@S2Ler S2Ler force-pushed the hotfix/data-race branch 2 times, most recently from 897dd5e to c4820c5 Compare September 28, 2021 14:15
@S2Ler S2Ler self-assigned this Sep 29, 2021
Copy link
Contributor

@nagineni nagineni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@S2Ler S2Ler merged commit d505e08 into main Sep 29, 2021
@S2Ler S2Ler deleted the hotfix/data-race branch September 29, 2021 09:56
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.

🐞 [iOS] Data race during sendTurnstileEvent
2 participants