Asynchronous programming using Coroutines
summary
Compares callback-based and RxJava approaches to Kotlin coroutines, showing how suspend functions and async/await make nested callbacks read like sequential code. Covers a Retrofit extension that converts callback APIs into suspending calls via continuations, demonstrates concurrent work (parallel image downloads), explains cancellation issues (non-cooperative blocking vs using isActive or suspend points like delay), and reviews coroutine builders (launch, runBlocking, withContext) plus running tests synchronously by swapping the main builder.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 2:31Synchronous code problems
- 7:08What are coroutines
- 9:18Launch coroutines
- 12:11Async coroutines
- 15:51runBlocking coroutines
- 17:15Execution contexts
- 18:40Concurrent coroutines
- 21:54Coroutine advantages
- 26:58How they work under the hood
- 33:03Coroutine extensions
- 35:59Testing coroutines
- 40:48Q&A
related talks
29mTrip into the async world
30mBetter asynchronous programming with Kotlin Coroutines
20mLean Async Code with Kotlin's Coroutines
32mNetworking the Kotlin way: Retrofit + Coroutines
35mEfficient Async with Kotlin Coroutines
40mDeep diving into the Kotlin Coroutines API
40mBuilding Asynchronous Mechanisms in Android App, Using Kotlin Coroutines
36mCracking Kotlin Coroutines
