Skip to content

Instantly share code, notes, and snippets.

@ferazog
Last active April 25, 2021 02:46
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 ferazog/24081ffcfb78b216ef04261403619383 to your computer and use it in GitHub Desktop.
Save ferazog/24081ffcfb78b216ef04261403619383 to your computer and use it in GitHub Desktop.
fun main() {
with(GlobalScope) {
launch(Dispatchers.IO) { // Establece que la coroutine se ejecute en un hilo de IO
// ...
}
GlobalScope.launch(Dispatchers.Main) { // Establece que la coroutine se ejecute en el UI Thread
// ...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment