Phaser.arrive() memory consistency effects
Petr Janeček via Concurrency-interest <[email protected]> Fri, 29 Jan 2021 12:05:17 +0100 (CET)
| Newsgroups | gmane.comp.java.jsr.166-concurrency |
|---|---|
| Message-ID | <D0h.1PlZ.1wYbtydgaF{.1W4{[email protected]> |
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? Thank you, Petr Janeček _______________________________________________ Concurrency-interest mailing list [email protected] http://cs.oswego.edu/mailman/listinfo/concurrency-interest