RFR: 8322829: Refactor nioBlocker to avoid blocking while holding Thread's interrupt lock [v2]

Jaikiran Pai jpai at openjdk.org
Mon Jan 8 09:28:28 UTC 2024


On Mon, 8 Jan 2024 09:04:57 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> In preparation for when virtual threads can unmount while holding a monitor or unmount when blocking on monitorenter, the implementation of VirtualThread's interrupt method is refactored to avoid parking/blocking while holding the Thread's interrupt lock. The implementations of sun.nio.ch.Interruptible are refactored to close/wakeup the InterruptibleChannel/Selector after releasing the interrupt lock. There is a lot of test coverage for async close and interrupt, no additional tests are added.
>
> Alan Bateman has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:
> 
>  - Make sun.nio.ch.Interruptible's javadoc a bit clearer
>  - Merge
>  - Merge
>  - Initial commit

Thank you Alan for the updated javadoc. This looks good to me.

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

Marked as reviewed by jpai (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17219#pullrequestreview-1808467345


More information about the core-libs-dev mailing list