5
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 16 Jun 2023
5 points (100.0% liked)
Java
1395 readers
1 users here now
For discussing Java, the JVM, languages that run on the JVM, and other related technologies.
founded 1 year ago
MODERATORS
I had never heard of Phaser, but it looks pretty cool. I just read Baeldung's Guide to Phaser and correct me if I'm wrong, but doesn't it kind of seem like a race condition (it could just be how they use it in the examples)?
then
if
ph.arriveAndAwaitAdvance();
is called before all of theLongRunningAction
s are initialized, won't it proceed before it is supposed to?Your analysis looks right to me. If this were mine I'd initialize all three before submitting any.