Kotlin Coroutines and (upcoming) Java Loom

Obviously project loom isn’t in the official JVM & JDK yet but I’m wondering (and it might be too early to discuss this really) … I’m wondering if developers running on the JVM that has Loom would use Kotlin coroutines.

Has anyone got thoughts on that?

Thanks, Rob.

You should use search on this forum. The question was raised multiple times. The basic answer from JB team is usually: “we’ll see”. Depending on how it will look like, Loom could be added as one of possible dispatchers. Some other changes could be done as well. The general consensus is that loom and coroutines solve different problems and they do not contradict to one another.

Hi, @rbygrave,

it might be too early to discuss this really

JDK’s coroutine and Kotlin’s coroutine are really different implementations, the first is stackful, the other stackless.

The key metrics for a good choice will be development facilities (including debugging, error rate and time to fix) and performances.
I propose you Fibers under the magnifying glass, some Nishanov’s considerations can be useful for your thoughts.

I wrote about Fibers and coroutine integration in similar threads.