On Mon, 3 Aug 2026 17:06:24 GMT, Jaikiran Pai <[email protected]> wrote:

>> test/jdk/java/net/Socket/SocketReadInterruptTest.java line 162:
>> 
>>> 160:             }
>>> 161:             return nativeThreadId;
>>> 162:         }
>> 
>> An alternative could be to use a `CompletableFeature<Long>` instead of a 
>> CountDownLatch.
>
> Hello Daniel, yes I think that's a cleaner option that using a 
> CountDownLatch. I've updated the PR accordingly. The test continues to pass.

Actually my suggestion was to  (also?) make `nativeThreadId`  a 
`CompletableFuture<Long>` ; But if the logic is that this method should never 
be called before calling ready.join() then that's OK.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32051#discussion_r3719588429

Reply via email to