Agent Engineering

Compare-and-Swap

An atomic operation that changes a value only if its current value or version matches an expected one. Comparison and replacement form one indivisible decision at the protected store. It is a building block for coordination, not a substitute for checking every business condition or managing effects outside that store.

Also called: CAS, Compare and swap

Reviewed

Sources

Member lesson

The definition and sources are public. The complete practical lesson is for members.

Compare membership plans ยท Already a member? Sign in

Explore all dictionary definitions