Kotlin Coroutines Articles

Testing Kotlin Coroutines: TestDispatcher, Virtual Time, and Turbine

A practical guide to coroutine unit testing with runTest virtual time, TestDispatcher injection, Dispatchers.Main replacement, Turbine Flow assertions, and common Android testing traps.

Kotlin Flow Engineering: Cold Flows, Channels, StateFlow, and SharedFlow

A practical guide to Kotlin Flow's cold and hot stream models, Channel primitives, SharedFlow and StateFlow tradeoffs, and Android MVVM layer choices.

Kotlin `suspend` Internals: From CPS Transformation to State-Machine Bytecode

A compiler-level walkthrough of how Kotlin turns suspend functions into state-machine bytecode, from CPS transformation and Continuation to local-variable liveness and coroutine resumption.