On a similar note, are there any plans for Kotlin coroutines to cooperate with Virtual Threads?
Kotlin coroutines can already be run on Loom’s virtual threads and in some scenarios it performs better, according to this article:
According to the article, it’s a one-liner
val Dispatchers.LOOM: CoroutineDispatcher
get() = Executors.newVirtualThreadPerTaskExecutor().asCoroutineDispatcher()
And now you can use this instead of, let’s say, Dispatchers.IO
.