Skip to content

Instantly share code, notes, and snippets.

@MarcoSignoretto
Created May 9, 2023 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoSignoretto/a7da5c106206f7f16ff539b5f7b6ec30 to your computer and use it in GitHub Desktop.
Save MarcoSignoretto/a7da5c106206f7f16ff539b5f7b6ec30 to your computer and use it in GitHub Desktop.
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.SupervisorJob
actual open class ViewModel {
actual val viewModelScope: CoroutineScope =
CoroutineScope(SupervisorJob() + Dispatchers.Main.immediate)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment