Skip to content

Instantly share code, notes, and snippets.

@jorgecasariego
Created February 19, 2020 00:51
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/ba75a21f1a2f8039610291bbcf656fc2 to your computer and use it in GitHub Desktop.
Save jorgecasariego/ba75a21f1a2f8039610291bbcf656fc2 to your computer and use it in GitHub Desktop.
fun main() = runBlocking {
log("Start")
hello() // not suspendable, no waiting!
log("Done")
}
private fun CoroutineScope.hello() = launch(Dispatchers.Default) {
delay(1000L)
log("Hello1")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment