Created
August 13, 2018 00:22
-
-
Save jeziellago/9f89d7d74ad0c5c47d2eef75bae40d7c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun loadTask() = launch(UI) { // executa na main thread | |
// executa em uma thread separada | |
val result1 = withContext(CommonPool) { // work! } | |
// executa na mesma thread | |
val result2 = withContext(Unconfined) { // work! } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment