Coroutines: Understanding ViewModel Scope - devrath/KotlinAlchemy GitHub Wiki

Untitled Diagram drawio

  • By default the ViewModel scope has a main dispatcher and a supervisor scope.
  • If you override it with another dispatcher, the main dispatcher gets overridden by the new dispatcher.
  • So anything you start by default, runs on mainthread here.
⚠️ **GitHub.com Fallback** ⚠️