Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8260664

Phaser.arrive() memory consistency effects

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • None
    • core-libs

      Petr Janeček wrote on concurrency-interest:

      Hello,
      I've been using Phaser a lot recently. It's very fast and works
      great overall. Thank you.

      That said, whenever I use it I feel slight guilt and a fear that
      my usage might break in the future. I can see the OpenJDK code
      and the current implied memory consistency effects, however I
      cannot see them stated anywhere in the docs.

      The package JavaDoc says:
      > Actions prior to calling [...] Phaser.awaitAdvance (as well as
      > its variants) happen-before actions [...] subsequent to a
      > successful return from the corresponding await in other threads
      This is OK.

      However, I cannot find any information about the arrive() method,
      or the effects of getPhase(). Because some of my threads do want
      to wait while the others sometimes don't, they simply want to
      publish a write (or read shared state) and move on without
      waiting.

      Would you please consider specifying the memory consistency
      effects of Phaser in greater detail, so that we can safely use it?

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: