https://mp.weixin.qq.com/s?__biz=MzIwMzY1OTU1NQ==&mid=2247485021&idx=1&sn=52e8251df51621607d0e9cde23839093&chksm=96cd4611a1bacf075de254e8929415b3378cf43e7ace791c06704b7fb39ac9c67fe1082c6220&mpshare=1&scene=1&srcid=1208x7ouWd4VIx99wfRks2B5&key=087b79ad3c1c39795a375681d36b83496dac23810c2eced2e73f61034712b77d950d04e6e227d3488a6dcc27ab41ccee85807d61547c102b324a5e746f88dd93335291b9e07bff97311b3c47f34bbf24&ascene=0&uin=MTA2NzUxMDAyNQ%3D%3D&devicetype=iMac+MacBookAir6%2C2+OSX+OSX+10.10.5+build(14F2511)&version=11020012&lang=zh_CN&pass_ticket=9rgp7yzXt5n8w9zh1MRq1i83%2BkhrOxABmxKneg1WadnOgS9TWM04YR%2BRF92XVaxK
原来,JDK8的ConcurrentHashMap也会造成CPU 100%
-
Map<String, String> map = new ConcurrentHashMap<>();
-
map.computeIfAbsent("AaAa",
key -> map.computeIfAbsent("BBBB", key2 -> "value"));
-
程序一直处于Running状态
top -Hp [pid]命令查看到其中一个线程的CPU使用率接近100%
====================================================