On Mon, 16 Nov 2026 08:39:46 GMT, Volkan Yazici <[email protected]> wrote:

>> Alan Bateman has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Fixed typos in test comments
>
> test/jdk/java/net/vthread/BlockingSocketOps.java line 702:
> 
>> 700:      * @return the thread that executes the task
>> 701:      */
>> 702:     private static Thread runAfterParkedAsync(ThrowingRunnable task) {
> 
> Currently, `awaitParked(target); task.run()` failures are only communicated 
> in the logs; they don't affect the test execution. You may consider returning 
> a `CompletableFuture<Void>`, passing `e` at line 764 to it, and always 
> finishing a `@Test` block with a `future.get()` to ensure no `task.run()` 
> failures are discarded.

If we have future issues where the thread hits an assert or fails then it may 
be annoying to have to look in the .jtr. So yes, this seems a reasonable 
suggestion for a future iteration of this test.

> test/jdk/java/net/vthread/BlockingSocketOps.java line 721:
> 
>> 719:      */
>> 720:     private static void awaitParked(Thread target) throws 
>> InterruptedException {
>> 721:         while (!isParked(target) || LockSupport.getBlocker(target) == 
>> null) {
> 
> Curious: Why doesn't `isParked()` have a `LockSupport.getBlocker(target) != 
> null` check, but `awaitParked()` does?

It's a coin toss. Yes, we could change isParked to test the state with a 
parkBlocker. It's much clearer in BlockingChannelsOps where we know the 
parkBlocker to test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33907#discussion_r4583870823
PR Review Comment: https://git.openjdk.org/jdk/pull/33907#discussion_r4583852335

Reply via email to