compare and set
compare and set
CAS = compare and set
CAS(比较并交换)是CPU指令级的操作,只有一步原子操作,所以非常快
java
cas
数据库操作
对应数据库sql update x=new where x=old