Browse topics
Kotlin Coroutines
Async & Await
async builder, await, parallel work and exception handling.
async awaitasync Function in Kotlinasync starts coroutine that returns Deferred result. A Kotlin example with source code and sample output.async awaitawait Result in Kotlinawait suspends until Deferred completes and returns value. A Kotlin example with source code and sample output.async awaitasync vs launch in Kotlinlaunch is for tasks that do not return result. A Kotlin example with source code and sample output.async awaitParallel Decomposition with async in KotlinMultiple async blocks can run concurrently inside same scope. A Kotlin example with source code and sample output.async awaitException Handling in async in KotlinExceptions in async are stored in Deferred until await. A Kotlin example with source code and sample output.
Related topics
Coroutine Basics Introduction, suspend functions, launch, runBlocking and coroutine scope. Dispatchers Main, IO, Default dispatchers and withContext for thread switching. Kotlin Flow Cold flows, operators, StateFlow and SharedFlow basics. Advanced Coroutines Coroutine cancellation, channels and producer-consumer patterns.