Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas

PatilShreyas/CoroutineBasic.kt Secret

Created Dec 29, 2020
Embed
What would you like to do?
fun main() = runBlocking {
launch {
delay(100)
println("Hello with delay 100")
}
launch {
delay(10)
println("Hello with delay 10")
}
launch {
delay(1)
println("Hello with delay 1")
}
println("Hello World!")
}
/* OUTPUT:
Hello World!
Hello with delay 1
Hello with delay 10
Hello with delay 100
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment