RFR: 8373120: Virtual thread stuck in BLOCKED state [v2]

Alan Bateman alanb at openjdk.org
Sat Jan 17 19:53:31 UTC 2026


On Fri, 16 Jan 2026 17:09:21 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>> test/jdk/java/lang/Thread/virtual/stress/NotifiedThenTimedOutWait.java line 77:
>> 
>>> 75:             }
>>> 76:         });
>>> 77:         var pthread = Thread.ofPlatform().start(() -> {
>> 
>> A future maintainer may wonder why the notify is done in a platform thread in race1, and a virtual thread in race2. We should probably add a comment.
>
> Added a comment. Maybe we should use `ThreadLocalRandom` in both cases to decide whether the notifier should be a platform or virtual thread?

Good idea, could be TLR or just different runs of test but the effective would be adding more timing scenarios to the testing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29255#discussion_r2701419978


More information about the core-libs-dev mailing list