-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: None
-
Component/s: Internal, Performance
-
None
Virtual threads were added in Java SE 21 (see https://openjdk.org/jeps/444). 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
See this comment for the design thoughts.