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