Skip to content
0:00 / 0:00

#coroutines#kotlinx.coroutines#structuredconcurrency

KotlinConf 2018 - Kotlin Coroutines in Practice by Roman Elizarov

JetBrains

236K subscribers • 30 videos on Hallway

YouTube
  • Recommended by 3 people: 3 in engineering communities.
  • A classic. People kept recommending it from 2018 to 2024.
  • Presented by Roman Elizarov, Kotlin libraries team lead
  • Made by the vendor. The company whose product it covers made or sponsored it.

Intermediate. Assumes working knowledge.

94K views8 years ago3 recommendations

Programming languagesSoftware designKotlinConcurrency and parallelismDesign patterns

Roman Elizarov demonstrates how to use Kotlin coroutines to solve real-world concurrency, coordination, and state management problems.

Recording brought to you by American Express americanexpress.io/kotlin-jobs Let's see how Kotlin Coroutines are used to solve real-life concurrency and coordination problems. With coroutines we don't have to worry about shared mutable state and synchronization. We can solve the problems we face using a number of communicating coroutines, where each piece of state is confined to a single coroutine. About the Presenter: Roman Elizarov is a professional software developer with more than 17 years of experience. He had started his career at Devexperts, where he designed and developed high-performance trading software for leading brokerage firms and market data delivery services that routinely handle millions of events per second. He is an expert in Java and JVM, particularly in real-time data processing, algorithms and performance optimizations for modern architectures. Roman currently works on Kotlin language at JetBrains. Having worked on very large systems compromising many modules written in different languages, he has a dream of a single language that can be used to write all parts of a very large distributed system, to share and reuse data models and algorithms without friction. Kotlin with JVM and JS backends and upcoming native compiler is the ideal candidate to realize this dream. In 2000 Roman had graduated from St. Petersburg ITMO. He now teaches a course on concurrent and distributed programming in ITMO. During his undergraduate study he participated at ACM International Collegiate Programming Contest (ICPC). Since 1997 and until now Roman serves as a Chief Judge of Northeastern European Regional Programming Contest.

Why it's here

3 people recommend this

What people say. Recommended for understanding practical coroutine usage, structured concurrency, and automatic cancellation.

u/i_dont_know_him_manin r/Kotlin • Recommends

On “Resources on coroutines”

In my opinion the content of Roman Elizarov (ex-project lead on Kotlin) is pure gold in understanding these concepts at a deeper level. I don't know if this is a style that fits all (probably not) but from my experience and from some chats with colleagues I figured this is some good material that works with a relative large audience. I gathered some resources here for you, but in case you find the time I would recommend browsing through his medium protfolio or his conference talks. # Coroutines * Kotlin Coroutines, a deeper look * Coroutine Context and Scope * The reason to avoid GlobalScope # Flows & Channels: * Shared flows, broadcast channels * Cold flows, hot channels Now in ca…

u/Orffyreusin r/Kotlin • Recommends

On “Coroutines are executing sequentially”

According to the KotlinConf talk Kotlin Coroutines in Practice by Roman Elizarov the "parallelFor" should be suspending and a CoroutineScope extension, so the solution would look more like: ``` import kotlinx.coroutines.* fun main(args: Array<String>) = runBlocking { parallelFor(0..99) { index -> println(index) } } suspend inline fun <T> CoroutineScope.parallelFor(range: Iterable<T>, crossinline block: (item: T) -> Unit) { for (item in range) { launch(Dispatchers.Default) { block(item) } } coroutineContextJob?.children?.forEach { it.join() } } ```

u/Gekiranin r/Kotlin • Recommends

On “Coroutines are executing sequentially”

This will answer all your questions: link to this video

u/Orffyreusin r/Kotlin • Recommends

On “How to use coroutine scope?”

If you want to manually cancel one coroutine, GlobalScope is ok. How to implement automatic cancelling of nested coroutines inside your own CoroutineScope is nicely explained in the KotlinConf talk link to this video by Roman Elizarov.