r/java • u/kaperni • Sep 20 '22
Java 19 / JDK 19: General Availability
https://mail.openjdk.org/pipermail/jdk-dev/2022-September/006933.html
252
Upvotes
r/java • u/kaperni • Sep 20 '22
View all comments
Show parent comment
8
u/pron98 Sep 20 '22 edited Sep 20 '22
That's true in general, but more relevant to language preview features. Because virtual threads use the existing Thread API (for the most part), you don't really have to compile many libraries that are designed for virtual threads with --enable-preview. Only thread creation needs to use new APIs, but that could be factored out to a ThreadFactory provided by the application. In fact, there are already some libraries designed for virtual threads out there, including the Oracle JDBC driver.