Skip to content

Instantly share code, notes, and snippets.

@jorgecasariego
Created February 17, 2020 20:28
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 jorgecasariego/0d41272f9de40f4b69446707a22a6056 to your computer and use it in GitHub Desktop.
Save jorgecasariego/0d41272f9de40f4b69446707a22a6056 to your computer and use it in GitHub Desktop.
// Dispatchers.Main
suspend fun fetchDocs() {
// Dispatchers.Main
val result = get("developer.android.com")
// Dispatchers.Main
show(result)
}
// look at this in the next section
suspend fun get(url: String) = withContext(Dispatchers.IO){/*...*/}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment