Monday, 12 February 2018

Can two threads update the ConcurrentHashMap simultaneously ?

Yes it is possible that two threads can simultaneously write on the ConcurrentHashMap. ConcurrentHashMap default implementation allows 16 threads to read and write in parallel. 
But in the worst case scenario , when two objects lie in the same segment or same partition, then parallel write would not be possible.

No comments:

Post a Comment