Search⌘ K
AI Features

Coroutines: Built-in Support vs. Library

Understand the two main components of Kotlin coroutines: the minimal built-in language support and the more user-friendly kotlinx.coroutines library. Learn how these parts work together to enable efficient concurrency and prepare yourself to use the kotlinx.coroutines library effectively in Android development.

Components of coroutines

When talking about coroutines, it’s common to refer to them as a single concept. They consist of two components: built-in support provided by the Kotlin language (compiler support and elements in the Kotlin standard library), and the Kotlin coroutines library (named kotlinx.coroutines). Sometimes they are treated as the same entity, but they are very different.

Built–in support

Built-in language support is minimalistic. ...