-
Enhancement
-
Resolution: Fixed
-
P4
-
None
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?
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?