JDK8 ConcurrentHashMap的死锁bug

https://blog.csdn.net/lx1848/article/details/81256443
遇到这个问题
中间件的配置中心 提供的addListener接口,内部使用了concurrentHashMap的computeIfAbsent,并在方法中apply了listener的逻辑(通知listener),当使用方在listener的逻辑中再次调用addListener()方法时 会死循环

你可能感兴趣的:(JDK8 ConcurrentHashMap的死锁bug)