The volatile qualifier does not guarantee atomic operations by the standard. Instead of using volatile, we ought to use Atomic operations. This enhancement removes usage of volatile in G1 and instead uses a new class AtomicValue to do the operations.
- relates to
-
JDK-8234192 undefined behavior: C++ volatile keyword
- Open