Skip to content

Coroutines: Understanding ViewModel Scope

Devrath edited this page Dec 31, 2023 · 3 revisions

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.
Clone this wiki locally