I was going thru the ConcurrentHashMap code in Java 8 and I see that Segment and locks are not used any more. Which means CHM does not use Locks anymore and they are replaced with intrinsic locks? Also, why not implement Tree structure for collisions as we have in HashMap?
Asked
Active
Viewed 833 times
4
-
2Related: http://stackoverflow.com/questions/31577096/concurrenthashmap-which-concurrent-features-improved-in-jdk8 http://stackoverflow.com/questions/24872732/concurrenthashmap-jdk-8-uses-treenodes-instead-of-list-why http://stackoverflow.com/questions/36562643/concurrenthashmap-in-jdk8-code-explanation?rq=1 – Thilo Apr 12 '16 at 11:33
-
1Why do you think, `ConcurrentHashMap` does not resort to tree structures for hash collisions? – Holger Apr 12 '16 at 11:54