On Wed, 2 Dec 2026 15:31:34 GMT, Viktor Klang <[email protected]> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Review comments
>
> test/jdk/java/lang/Thread/virtual/UnparkQueuing.java line 72:
> 
>> 70:             });
>> 71:             ready.await();
>> 72:             await(thread, Thread.State.WAITING);
> 
> Do we need both the count down latch AND waiting for Thread.State.WAITING? 
> (Can the wait occur prior to LockSupport.park()?)

Yes, both are needed as it is possible to get preempted before this. This has 
been the source of several intermittent test failures in other areas so we've 
needed with the same thing as before in many tests.

> test/jdk/java/lang/Thread/virtual/YieldFairness.java line 86:
> 
>> 84:                         }
>> 85:                         task.result = value;
>> 86:                         task.finishTime = System.nanoTime();
> 
> I think it is worth commenting in the code the thread safety aspects of 
> updating and reading the Task values (i.e. what coordination mechanism is 
> used to establish happens-before of Task data).

Yes, this HB the scope owner returns from join. I'll add a comment.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/34118#discussion_r4772496959
PR Review Comment: https://git.openjdk.org/jdk/pull/34118#discussion_r4772526284

Reply via email to