Concurrency made easy with Kotlin Coroutines
summary
Shows that Kotlin Coroutines use the suspend keyword and transform functions into resumable state machines, replacing Thread.sleep with delay vs Thread.sleep nonblocking suspension so a pasta demo drops from 35s to 20s on one thread. Explains structured concurrency, scopes and error propagation, GlobalScope pitfalls, runBlocking for bridging and dispatchers (Default, IO, Main), demonstrates a Spring WebFlux + R2DBC reactive web app where coroutines are the glue, and claims thousands of coroutines with far less memory than 100k threads.
AI-written summary · about
chapters (7)
- 0:00Start
- 2:52NON-PREEMPTIVE MULTITASKING?
- 12:09COOKING PASTA... AGAIN
- 12:55STRUCTURED CONCURRENCY
- 16:39ERROR PROPAGATION
- 24:47Dispatcher TYPES
- 34:48LIBRARIES & FRAMEWORKS
related talks
01h 03mUsing Kotlin Coroutines for Asynchronous and Concurrent Programming
43mCoroutines for Java Developers
47mKotlin Coroutines
44mTesting Kotlin Coroutines
49mLaunching Into Coroutines
33mVisualising concurrency with Kotlin
49mAsynchronous programming with Kotlin coroutines in Spring
42mKotlin Coroutines: Beyond async/await
