Skip to content

Instantly share code, notes, and snippets.

@jorgecasariego
Created February 19, 2020 00:49
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/c50806ea54bbff404a65c249d7258560 to your computer and use it in GitHub Desktop.
Save jorgecasariego/c50806ea54bbff404a65c249d7258560 to your computer and use it in GitHub Desktop.
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