目录 1.什么是CAS? ---比较并交换(compare and swap) 1.1 AtomicInteger是什么? 1.2 AtomicInteger 小Demo 2.CAS的底层原理 2.1 一句话解释:Unsafe类和自旋锁 2.2 Unsafe类