The runtime uses ExecutorService and friends to run coroutines, which are bits of CPS-transformed Kotlin code that are generated when you compile a 'suspend fun' declaration.
The way the code looks is completely different and significantly cleaner and faster to write in Kotlin. Actual performance and final functionality is likely to be same.
Shawnecy|2 years ago
The best I can tell is that coroutines are a bit lighter weight (in terms of what state is managed) and have a bit simpler usage out-of-the-box.
But I've not used them myself so maybe I'm not seeing how big of advantage those are or perhaps there's more to it than that?
jayd16|2 years ago
mst|2 years ago
The point (I think) was as an exercise to demonstrate it was possible to implement in 'userland' and how they did so.
tadfisher|2 years ago
lfmunoz4|2 years ago