Kotlin Coroutines: Beyond async/await
summary
Kotlin implements concurrency by pushing behaviour into libraries so code uses one keyword: suspend while async and await are ordinary functions that return deferred as future objects. The compiler turns suspend points into a state machine with resume/resumeWith semantics; Retrofit integrates via a Retrofit call adapter that yields Deferred and an await extension. Coroutines run lightweight workloads (demonstrated with 100,000 coroutines), support channels, cooperative cancellation via Job, and practical helpers like retryIO and lifecycle-aware cancellation.
AI-written summary · about
chapters (14)
- 0:00Introduction to coroutines
- 1:11Why coroutines matter
- 3:19Callback hell and solutions
- 7:11Async await in Kotlin
- 10:43How coroutines work
- 16:41Networking with Retrofit
- 21:16Coroutine builders explained
- 24:46Coroutines vs threads
- 27:18Coroutine context details
- 29:05Retrying failed operations
- 31:11Lifecycle management
- 32:57Channels for communication
- 37:54Advanced coroutine features
- 40:00Kotlin 1.3 coroutines update
related talks
59mKotlin coroutines: new ways to do asynchronous programming
49mKotlin Coroutines
47mKotlin Coroutines
30mBetter asynchronous programming with Kotlin Coroutines
42mKotlin Coroutines: An Intro to Practical Use on Android
01h 03mUsing Kotlin Coroutines for Asynchronous and Concurrent Programming
11mKotlin Coroutines: Design and Implementation
43mCoroutines for Java Developers
