4

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?

From Java 8 ConcurrentHashMap

Thilo
  • 257,207
  • 101
  • 511
  • 656
Raj Vee
  • 41
  • 1
  • 2
    Related: 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
  • 1
    Why do you think, `ConcurrentHashMap` does not resort to tree structures for hash collisions? – Holger Apr 12 '16 at 11:54

0 Answers0