On Thu, 13 Nov 2025 20:38:52 GMT, Daniel D. Daugherty <[email protected]> 
wrote:

>> The `notify()` call doesn’t unpark the waiter thread, it just moves it from 
>> the `_wait_set` to the `_entry_list`. The wait(timeout) is there to allow it 
>> to run again so that it is suspended in `reenter_internal()`. But currently 
>> the timings will not exercise this case well. I added some comments to fix 
>> it.
>
> Please see the notes in the new doWork3 transaction diagram. I think I've 
> covered this case.

Thanks @dcubed-ojdk! I added your diagrams to the test.

>> This sleep is not needed.
>
> I have a comment about this in the new doWork3 transaction diagram.

Removed as suggested.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2527248191
PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2527245983

Reply via email to