top of page

Omkar Tenkale
Android Engineer at Deliveroo
Pragmatic Android Engineer
Building the Coroutine Framework from Scratch
Coroutines often feel like magic until something breaks.
In this talk, we’ll build a tiny coroutine framework from scratch using only Kotlin’s built-in features. We’ll start by looking at how a coroutine is executed line by line after compiler transformations. Then, we’ll explore the core constructs Kotlin gives us and implement our own lightweight versions of launch, withContext, and Dispatchers to see how it all comes together.
Key Takeaways
- Build simple coroutine constructs that emulate library functions like launch, withContext, etc.
- Understand how the compiler rewrites suspending code.
- Develop a clear mental model of coroutine control flow.
- Recognize and avoid common pitfalls when working with coroutines.
- Gain confidence to write more predictable and less error-prone async code
bottom of page
