Skip to main content
InterviewHubPRO
Section Overview
Q17

Question 17 of 50

Part 2: Coroutines, Flow & Concurrency Architecture (11 - 24)

34%
Kotlin & Coroutines (50 Qs)•Part 2: Coroutines, Flow & Concurrency Architecture (11 - 24)

What is the difference between Dispatchers.Default, Dispatchers.IO, and Dispatchers.Main?

senior LevelSystem Design

In Simple Words:

  • Dispatchers.Default: Sized to CPU core count ($N$ threads). For CPU-intensive tasks (sorting, JSON parsing).
  • Dispatchers.IO: Dynamically scales up to 64 threads. For blocking I/O (files, network, database).
  • Dispatchers.Main: Single UI thread on Android.