JDK-8318422 : Allow poller threads be virtual threads
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 21,22
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-10-18
  • Updated: 2025-10-31
  • Resolved: 2023-11-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b23Fixed
Related Reports
Causes :  
Relates :  
Relates :  
Description
Right now, the read and writer poller threads are dedicated platform threads that block waiting for I/O events and unpark virtual threads when file descriptors are ready for I/O. In some environments it would be better to have the poller thread be virtual threads so that handling of I/O events better integrates with the virtual thread scheduler.
Comments
Note for casual readers (like me): with this change, Linux default poller was changed to virtual thread, so the issue is not only about "allowing" virtual thread pollers, but actually changing the default on at least one platform. This is a bit inconvenient, as without the change to defaults, we could have easily backport this to 21u and let users experiment with it by explicitly opting-in.
06-11-2023

Changeset: c099cf53 Author: Alan Bateman <alanb@openjdk.org> Date: 2023-11-04 06:52:19 +0000 URL: https://git.openjdk.org/jdk/commit/c099cf53f25496c99629dc578045aa5186e1109d
04-11-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16243 Date: 2023-10-18 10:31:32 +0000
02-11-2023