Skip to content

Back the subscriptions by a thread safe collection map #80

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

Merged
merged 1 commit into from
Mar 28, 2018

Conversation

mmimeault
Copy link
Contributor

Fixing: #78

We started to having this issue when using the client in a multi-thread context.
The SparseArray initially used was a good idea to optimize a mapping between an Integer and an Object. But obviously, it is not "thread safe". Instead of doing a full synchronized wrapper over the SparseArray, let's simply use a Concurrent Hash map.

@mmimeault mmimeault requested review from jhansche and rogerhu March 27, 2018 20:09
@codecov
Copy link

codecov bot commented Mar 27, 2018

Codecov Report

Merging #80 into master will increase coverage by 0.08%.
The diff coverage is 83.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #80      +/-   ##
===========================================
+ Coverage     68.11%   68.2%   +0.08%     
  Complexity       82      82              
===========================================
  Files            11      11              
  Lines           367     368       +1     
  Branches         24      24              
===========================================
+ Hits            250     251       +1     
  Misses          103     103              
  Partials         14      14
Impacted Files Coverage Δ Complexity Δ
.../main/java/com/parse/ParseLiveQueryClientImpl.java 75.7% <83.33%> (+0.11%) 56 <1> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d483d1b...b5f3ccc. Read the comment docs.

@mmimeault mmimeault merged commit 62b8102 into master Mar 28, 2018
@mmimeault mmimeault deleted the bugfix/issue-78 branch March 28, 2018 14:29
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.

2 participants