androidengineers.Book a session
โ† All interview questions
KotlinIntermediate4 min

Dispatchers.Default vs Dispatchers.IO?

Answer

FeatureDispatchers.DefaultDispatchers.IO
Optimized ForCPU-intensive tasksBlocking I/O tasks
Thread PoolFixed size (Num Cores)Elastic size (up to 64+)
ExamplesSorting, JSON parsing, DiffUtilsAPI calls, DB queries, File I/O

Key Difference: `IO` can create many more threads because I/O tasks spend most of their time waiting. `Default` limits threads to CPU cores to keep the processor efficient.

Mark this when you can explain the answer in your own words.

Share & Help Others

Help fellow developers prepare for interviews

Sharing helps the Android community grow ๐Ÿ’š

Keep practising