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

Use data and lock #40

Closed
wants to merge 4 commits into from
Closed

Use data and lock #40

wants to merge 4 commits into from

Conversation

3a4oT
Copy link
Contributor

@3a4oT 3a4oT commented Oct 23, 2023

  • migrated from NSMulatbleData to Data
  • marked APIManager as final class
  • added an NSLock instance to the APIManager class to synchronize access to shared resources. Swift dictionary is not thread-safe and accessing it from singleton instance (Flagsmith.shared) can lead to race conditions.

@3a4oT
Copy link
Contributor Author

3a4oT commented Nov 16, 2023

After two weeks of observation, I can state that it fixes our crashes on production. Please take a look at it, since we want to drop an internal fork. cc @dabeeeenster

@dabeeeenster
Copy link
Collaborator

We're going to write some unit tests around this first I think!

@matthewelwell
Copy link
Contributor

I think this can be closed as superseded by #45

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.

3 participants