RFR: 8372159: HttpClient SelectorManager thread could be a VirtualThread [v2]
Daniel Fuchs
dfuchs at openjdk.org
Wed Nov 19 19:03:28 UTC 2025
> Each HttpClient instance creates an additional platform thread for its SelectorManager. With recent updates to NIO/VirtualThreads that thread could now become a VirtualThread. This would avoid having each HttpClient instance use up one platform thread.
> This is similar to what was done for the HttpClient QuicSelectorThread in [JDK-8369920](https://bugs.openjdk.org/browse/JDK-8369920).
> This should be transparent for users of the API.
> An undocumented internal system property is introduced that can revert the change in case of unforeseen trouble.
Daniel Fuchs has updated the pull request incrementally with one additional commit since the last revision:
Revert changes to SelectorManager::shutdown
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/28395/files
- new: https://git.openjdk.org/jdk/pull/28395/files/a311e708..dd4acad7
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=28395&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=28395&range=00-01
Stats: 8 lines in 1 file changed: 0 ins; 8 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/28395.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/28395/head:pull/28395
PR: https://git.openjdk.org/jdk/pull/28395
More information about the net-dev
mailing list