mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-05-25 21:59:38 +00:00
JMH 多线程缓存淘汰压力测试,存在并发问题
checkMaximumSize sorted
This commit is contained in:
@@ -155,7 +155,7 @@ public class LazyCache<K, V> {
|
||||
removeListener.accept(removeList, removalCause);
|
||||
}
|
||||
|
||||
private void checkMaximumSize() {
|
||||
private synchronized void checkMaximumSize() {
|
||||
if (cacheMap.size() > backPressureSize) {
|
||||
var removeList = cacheMap.values()
|
||||
.stream()
|
||||
|
||||
Reference in New Issue
Block a user