seniorKotlin
What is coroutine cancellation and how does it propagate?
Updated May 16, 2026
Short answer
Cancellation in coroutines is cooperative and propagates through parent-child hierarchy.
Deep explanation
When a parent coroutine is cancelled, all its child coroutines are also cancelled. Cancellation is cooperative, meaning coroutines must check for cancellation via suspension points or isActive. This ensures structured concurrency safety.
Unlock with a Pro subscription to view this section.
View pricingReal-world example
No real-world example available yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProCommon mistakes
No common mistakes listed yet.
Unlock with a Pro subscription to view this section.
Upgrade to ProFollow-up questions
No follow-up questions available yet.
Unlock with a Pro subscription to view this section.
Upgrade to Pro