Created
February 19, 2020 00:49
-
-
Save jorgecasariego/c50806ea54bbff404a65c249d7258560 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 main() = runBlocking { | |
println("Start") | |
hello(this) | |
println("Done") | |
} | |
fun hello(scope: CoroutineScope) { // or as extension function | |
scope.launch { | |
delay(1000L) | |
println("Hello") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment