Coroutines and Loom behind the scenes by Roman Elizarov

Channel:Kotlin by JetBrains · Length:45:21 · Published:2023-05-04 · Views:41005

Watch on YouTube

Summary

Roman Elizarov compares Kotlin Coroutines with OpenJDK Project Loom virtual threads, looking at their design goals and how those translate into different implementations and tradeoffs. He addresses how the two can coexist.

Why HN recommends it

Pointed to in Java 21 and Loom discussions as the Kotlin lead's authoritative view on coroutines versus virtual threads.

it is an interesting talk regardless. — HN, 2023

Programming language design · Python, Ruby & scripting languages · Software architecture & design

Subtitles (excerpt)

foreign [Music] so today we'll be talking about cartoons and Loom and the only reason I'm making this talk is that people come and you know ask this very simple question will project will make proteins Obsolete and of course it would make no sense to have the whole talk of answering this question because you know there's a rule if there's a question of the title then the answer is always no and you can even actually ask GPT about it and it will like clear answer no it's not the case we'll give you like very politically correct answer what's going on it's kind of correct actually answer even though it's not that Zoom is Java based has nothing to do with Java the language and my actual goal is not to give you like this simple answer my goal is to explain the details so you understand what's going on and how you can use both Loom encouraging so what we'll cover today is is basically three things first we'll I'll give you a shorter view about project Gloom does and I kind of expect that uh since that is a coffin conf end I had personally made a number of talks here at conflict coding so I hope you watch them in advance or who actually watch my cartoon stock in advance like let's do show of hands who watched my okay

On Hacker News

Here's a take from Roman Elizarov (Kotlin bias) - [VIDEO] I imagine a lot of the missing structured concurrency will get built up over time on the Java side, but it is an interesting talk regardless. — dangets, 2023-08
here is the talk by Roman Elizarov, the Kotlin project lead, at KotlinConf 2023 about Coroutines vs VThreads: [VIDEO] short version: both were optimized for different things, so there is a place for both of them. — simon_void, 2023-10
It's pretty hard to use Kotlin without co-routines these days. Most modern Kotlin frameworks tend to use them. And they work outside the JVM as well. Mostly we're talking about Java projects focusing on doing things the Java way that may or may not be using Kotlin for that. Kotlin mobile is unaffected; it won't get Loom any time soon (as far as I know) and things just don't work the same way ther… — jillesvangurp, 2023-08
Yeah, Kotlin does have the colored-function problem, in the same way that Node/JS has. Loom and Virtual Threads are one area I'm not as familiar with. What I do know is that you can configure virtual threads as the coroutine dispatcher for Kotlin coroutines, and in a recent video Roman Elizarov talked about how the default "Dispatchers.IO" could theoretically leverage VT's in some future JDK. [VI… — gavinray, 2023-06
> 5. Java with virtual threads now has far better support for async programming than Kotlin or Scala. It is now competitive with Golang in async ease-of-use green thread/stackfull coroutine such as in go/java and stackfless coroutine as in kotlin are well know solutions for introducing async programming in a way that feel natural to dev. They both have strength and limitation, i don't think one o… — soulbadguy, 2023-06

Related videos