0PricingLogin
Kotlin Multiplatform Academy · Lesson

Dispatchers Across Platforms

Choose dispatchers that exist on Android and iOS.

Where Work Actually Runs

A coroutine still runs on some thread. A dispatcher decides which thread or pool it uses, and that choice matters on each platform.

Meet Dispatchers.Default

Use Dispatchers.Default for CPU-heavy work like parsing or sorting. It exists on Android and iOS, so shared code can rely on it.

withContext(Dispatchers.Default) { sort(data) }

All lessons in this course

  1. suspend Functions That Work Everywhere
  2. Dispatchers Across Platforms
  3. CoroutineScope & Lifecycle
  4. withContext & Structured Concurrency
← Back to Kotlin Multiplatform Academy