0

Inside 'computeIfAbsent' method of ConcurrentHashMap there is code:

            synchronized (r) {
                if (casTabAt(tab, i, null, r)) {
                  ...

Why not 'ReentrantLock' ?

littleAlien
  • 721
  • 2
  • 8
  • 20

0 Answers0