CoroutineScope & Lifecycle
Tie shared async work to the right scope and cancel it.
Coroutines Need a Home
Every coroutine belongs to a CoroutineScope. The scope decides how long the work may live and when it should stop.
Why Scope Equals Lifecycle
Tie a scope to a screen or session. When that thing ends, the scope cancels its coroutines so no work runs against a dead UI.
All lessons in this course
- suspend Functions That Work Everywhere
- Dispatchers Across Platforms
- CoroutineScope & Lifecycle
- withContext & Structured Concurrency