Following up on JDK-8367013 improvement, there is an opportunity to rewrite some of our low-level `cas(oldv, newv) == oldv` patterns to more straight-forward compare-and-set helper method. This is useful when you do not actually care about the result that used to be in memory or that is currently in memory.
Java atomics already have this distinction; arguably due to historical timeline of having compare-and-set before introducing compare-and-exchange.
Found this when converting Epsilon to Atomic<T> (JDK-8374876), where this method would simplify the code a bit.
Java atomics already have this distinction; arguably due to historical timeline of having compare-and-set before introducing compare-and-exchange.
Found this when converting Epsilon to Atomic<T> (JDK-8374876), where this method would simplify the code a bit.
- blocks
-
JDK-8374876 Epsilon: Convert to use Atomic<T>
-
- Open
-
- is blocked by
-
JDK-8367013 Add Atomic<T> to package/replace idiom of volatile var plus AtomicAccess:: operations
-
- Resolved
-
- links to
-
Review(master)
openjdk/jdk/29135