(computing, of an operation) Guaranteed to complete either fully or not at all while waiting in a pause, and running synchronously when called by multiple asynchronous threads.
In order to avoid race conditions, this operation has to be atomic.
Whenever possible, use atomic types instead of mutexes.
2006, Tim Peierls, Brian Goetz, Joshua Bloch, Joseph Bowbeer, Doug Lea, David Holmes, Java Concurrency in Practice, Pearson Education, →ISBN, page 325:
It also provides an atomic compareAndSet method (which if successful has the memory effects of both reading and writing a volatile variable) and, for convenience, atomic add, increment, and decrement methods.