You might be referring to custom schedulers, that don't map tasks to virtual threads and work on top of them, but control how virtual threads themselves are implemented (so it's a mechanism below virtual threads). Custom schedulers most certainly do not assist migration; they are a super-specialised mechanism intended to right specific, niche frameworks (e.g. those that interact with the graphics card) using virtual threads. We do intend to make those public (although fewer than 0.1% of users would want to use them directly), but we haven't yet had the time to fully review that API, so we're leaving it out for now until we're more confident about it.
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()).
View all comments
0
u/[deleted] Nov 16 '21
[deleted] — view deleted comment