Inside 'computeIfAbsent' method of ConcurrentHashMap there is code:
synchronized (r) {
if (casTabAt(tab, i, null, r)) {
...
Why not 'ReentrantLock' ?
Inside 'computeIfAbsent' method of ConcurrentHashMap there is code:
synchronized (r) {
if (casTabAt(tab, i, null, r)) {
...
Why not 'ReentrantLock' ?