Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Semantics of volatile do not guarantee the atomicity of complex operations that involve read-modify-write sequences such as incrementing a value. See CON01-J. Ensure Design APIs that ensure atomicity of composite operations and visibility of results for more information.

...

CON25-EX1: If all reads and writes of 64 bit long and double values occur within a synchronized method call, the atomicity of the read/write is guaranteed. This requires that no unsynchronized methods in the class expose the value and that the value is inaccessible (directly or indirectly) from other code. (CON01-J. Ensure Design APIs that ensure atomicity of composite operations and visibility of results)

...