Java Concurrent API's
Can some one please explain how CAS(compare swap) machine instructions are leveraged by java concurrent A开发者_开发百科PI's?
CAS instructions are used in the Atomic* classes.
For why you would want to use them vs volatile
, see here.
精彩评论