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
Dependency injection / module architecture broke all thread safety #118
Comments
Do you have any sample situations where the current approach is causing issues? |
This is a confusing to me. If this is the case, why does almost every method in If thread-safety is not intended, it would make sense to remove the synchronized keyword from these method signatures. Alternatively, you could add I don't have a specific situation in which it was crashing. I haven't been working on the project much in the past few months and just recently noticed that the module setup broke thread safety that used to exist as all of those methods used to be in the same class. |
We do try to make it as thread safe as possible. |
I guess I had someting else in mind when talking about "explicit multi threading". I'll look into improving the current threading protections. |
Hello. Just a fyi, this commit should fix this issue: |
Fix released |
Thread safety across the SDK was lost when synchronized methods from the old Countly god-object were moved into their respective modules. These methods are now synchronized with different locks (their interface, an inner class of the module), and are therefore no longer thread safe. Thread safety can be regained trivially by using the
Countly
instance passed to each module as the module and interface wide lock.eg.
should become
The text was updated successfully, but these errors were encountered: