LongAdder與Atomic*

Atomic類https://blog.csdn.net/weixin_38336658/article/details/86708083 採用CAS模式來控制安全性 LongAdder類似與ConcurrentHashMap,可以將熱點數據分離,相應的速度,性能比Atomic類會好 它有2個方法,add(long x),increment(),sum() increment()調用的是sum()
相關文章
相關標籤/搜索