-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Internal, Performance
-
None
Virtual threads will be added to the JDK in Java 21. The driver can take advantage of them, even though its minimum Java version is still 8, with a little indirection that detects whether virtual threads are supported (using reflection, most likely), and creating virtual threads instead of platform threads when they are available.
Virtual threads seem ideal for all threads currently created by the driver itself, including those in:
- DefaultServerMonitor
- DefaultConnectionPool
- DefaultDnsSrvRecordMonitor