...
- A write to a variable does not depend on its current value.
- A write to a variable does not depend on the result of any non-atomic compound operations involving reads and writes of other variables. (For more information, see CON01CON02-J. Ensure that compound operations on shared variables are atomic.)
...
Synchronization is a more secure alternative in situations where the volatile
keyword or a java.util.concurrent.atomic.Atomic*
field is inappropriate, such as if a variable's new value depends on its current value. For more information, see CON01CON02-J. Ensure that compound operations on shared variables are atomic.
...
11. Concurrency (CON) 11. Concurrency (CON) CON01CON02-J. Ensure that compound operations on shared variables are atomic