Skip to content

Instantly share code, notes, and snippets.

@abohomol
Created October 25, 2018 11:47
Show Gist options
  • Save abohomol/5a800529a9cfa91e1481e1bce5cd2e8c to your computer and use it in GitHub Desktop.
Save abohomol/5a800529a9cfa91e1481e1bce5cd2e8c to your computer and use it in GitHub Desktop.
launch(UI) {
val service = ...
val profile = service.getProfile() // background thread
view.showUserName(profile.name) // UI thread
finalizeOnboarding() // background thread
}
@etonotieno
Copy link

launch(UI) has been deprecated. Use coroutineScope.launch(Dispathers.Main) instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment