Reputation: 49
Can some one please explain how CAS(compare swap) machine instructions are leveraged by java concurrent API's?
Upvotes: 1
Views: 297
Reputation: 6229
CAS instructions are used in the Atomic* classes.
For why you would want to use them vs volatile
, see here.
Upvotes: 2