On Sat, 14 Nov 2026 16:20:11 GMT, Alan Bateman <[email protected]> wrote:

> The "blocked in write" tests in BlockingSocketOps and BlockingChannelOps are 
> problematic as the underlying non-blocking socket may be polled as writable 
> several times before the virtual thread writer blocks indefinitely. The tests 
> were updated recently to additionally test the blocked thread's parkBlocker, 
> which makes it harder to test when it wakes up several times.
> 
> The tests are simplified to avoid special casing the writing case. The 
> runAfterParkedAsync method in both tests now polls the thread until it parks 
> and the parkBlocker is set. BlockingChannelOps tests the expected parkBlocker 
> whereas BlockingSocketOps just tests for a non-null parkBlocker.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 270be248
Author:    Alan Bateman <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/270be248e648e54bf58b222eb8fc8d3a69e4e765
Stats:     653 lines in 2 files changed: 192 ins; 188 del; 273 mod

8397221: java/net/vthread/BlockingSocketOps.java#no-vmcontinuations observed 
failing intermittently

Reviewed-by: vyazici, djelinski, dfuchs

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

PR: https://git.openjdk.org/jdk/pull/33907

Reply via email to