Loki
Loki

Reputation: 49

Java Concurrent API's

Can some one please explain how CAS(compare swap) machine instructions are leveraged by java concurrent API's?

Upvotes: 1

Views: 297

Answers (1)

AngerClown
AngerClown

Reputation: 6229

CAS instructions are used in the Atomic* classes. For why you would want to use them vs volatile, see here.

Upvotes: 2

Related Questions