Level 1 · Apprentice0 XP
What happens when work must stop or fails, and which thread it runs on.
Step 1 / 5
ProblemThe user leaves a screen. The coroutine loading its data keeps running, finishes, and tries to update a view that is gone. Elsewhere one failed child request cancels four others that were fine.
← → step
Before this: Flow
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Launch a coroutine that loops forever doing CPU work and cancel it after 100 ms: watch it not stop. Add ensureActive() and watch it stop. Then load two things with async in coroutineScope and make one fail, and repeat with supervisorScope. Describe the difference.