atomic 主要利用 CAS (Compare And Swap) 和 volatile 和 native 方法来保证原子操作,从而避免 synchronized 的高开销,执行效率大为提升。

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.