RFR: 8349787: java/lang/Thread/virtual/ThreadPollOnYield.java#default passes unexpectedly without libVThreadPinner.so [v3]
SendaoYan
syan at openjdk.org
Wed Feb 12 07:43:50 UTC 2025
On Wed, 12 Feb 2025 07:15:58 GMT, Alan Bateman <alanb at 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
More information about the core-libs-dev
mailing list