I know that compound operations such as i++ are not thread safe as they involve multiple operations.
i++
But is checking the reference with itself a t
Even simple read is not atomic. If a is long and not marked as volatile then on 32-bit JVMs long b = a is not thread-safe.
a
long
volatile
long b = a