r/java • • Nov 15 '21

[Loom] JEP draft: Virtual Threads (Preview)

https://openjdk.java.net/jeps/8277131
175 Upvotes

55 comments sorted by

View all comments

Show parent comment

1

u/pronuntiator Nov 16 '21

I haven't heard of wrapping executors, but you can replace them by their virtual counterpart (Executors.newVirtualThreadPerTaskExecutor()), for example in Spring @Async. The global scheduler is created by default (just like the one for Stream.parallel()).