Fix specs for updateAndGet and related methods

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: core-libs

        Doug Lea writes:

        The "...and all other read-and-update operations" clause
        inadvertently disappeared while meshing j.u.c.atomic specs
        with jdk9 VarHandles
        (http://download.java.net/java/jdk9/docs/api/java/lang/invoke/VarHandle.html)

        The updateAndGet method is not a part of VarHandles, so is no longer
        covered by any existing statement. We will need to somehow do so.

        http://markmail.org/thread/wrlo7tuajszbauqe#query:+page:1+mid:5ckdsgpbucpagn4b+state:results
        http://markmail.org/thread/wrlo7tuajszbauqe

        ---

        In addition Doug writes:

        On 05/25/2017 01:15 PM, Gil Tene wrote:
        >> (http://download.java.net/java/jdk9/docs/api/java/lang/invoke/VarHandle.html)
        > While on this subject, was the relative "weakening" of compareAndSet
        > (and other) memory semantics between Java 8 and java 9 discussed
        > elsewhere?

        The was no intention to weaken CAS specs. But in an attempt to clarify
        distinctions across new variants (compareAndExchangeRelease
        etc), the fact that the volatile-write property is unconditional
        here got lost. This also needs to be fixed.

              Assignee:
              Doug Lea
              Reporter:
              Martin Buchholz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: