Tag: Concurrency
All the articles with the tag "Concurrency".
-
Coroutine Dispatchers, Scopes, launch vs async, and Exception Handling in Android
Master Kotlin coroutine dispatchers (Main.immediate vs Main), lifecycle-aware scopes, when to use launch vs async vs withContext, job cancellation, and how exceptions propagate differently in each builder.
-
Kotlin Coroutine Internals: Continuation, CPS, and Why 100k Coroutines Won't Crash Your App
Understand how Kotlin suspend functions work under the hood — the Continuation interface, Continuation Passing Style, why 100k coroutines succeed where 100k threads crash, and how coroutines eliminate idle thread waste.
-
IO vs Computation Thread Pools — Why Android Has Two and When to Use Each
Learn why Android exposes two thread pools — IO and Computation — what makes them fundamentally different, and how Dispatchers.IO and Dispatchers.Default map to each.
-
Keep-Alive Time, Multiple Thread Pools, and Why 4 Threads Can Beat 40
Understand keep-alive time, why separating tasks into multiple thread pools improves UX, and the experiment that proves fewer threads can finish 10,000 tasks faster than more threads.