Skip to main content

Coroutines for Kotlins

Kotlin coroutines are lightweight, suspendable computations from the kotlinx.coroutines library that let you write asynchronous code in a sequential style. They are launched in scopes with builders like launch and async, and Flow extends them to streams of values that arrive over time.

Stage: Concurrency · Part of the Kotlin roadmap · Last reviewed 19 November 2026

What to learn in Coroutines

Coroutines interview questions

What is the difference between launch and async?

launch starts a coroutine for side effects and returns a Job, with no result value. async starts a coroutine that computes a value and returns a Deferred, whose result you get with await. Exceptions in async surface when you call await or when the parent scope fails.

Why is a coroutine cheaper than a thread?

A coroutine is a suspendable state machine managed by the library, not an operating system thread. Suspending frees the underlying thread to run other work, so thousands of coroutines can share a small thread pool without the memory and context switching cost of that many threads.

Where Coroutines fits in the Kotlin roadmap

Coroutines belongs to the Concurrency stage (intermediate level), which takes about 16 hours. Coroutines.

Back to the full Kotlin roadmap