On Wed, 12 Feb 2025 07:15:58 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> SendaoYan has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename latch to started, and do the countDown before the while loop > > test/jdk/java/lang/Thread/virtual/ThreadPollOnYield.java line 54: > >> 52: static void foo(AtomicBoolean done) { >> 53: while (!done.get()) { >> 54: latch.countDown(); > > While not incorrect, it looks very strange to do the count down in the loop. > It would be a lot clearer to rename "latch" to "started" and do the countDown > before the while. Also no need for it to be public. Thanks. Variable has been renamed to `started`, and do the countDown before the while loop. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23576#discussion_r1952124848