blob: 5de6698c236e99d79a16a5a03d3aab679a5a9a66 [file] [log] [blame]
// This file was automatically generated from coroutines-guide.md by Knit tool. Do not edit.
package guide.basic.example02
import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> { // start main coroutine
launch(CommonPool) { // create new coroutine in common thread pool
delay(1000L)
println("World!")
}
println("Hello,") // main coroutine continues while child is delayed
delay(2000L) // non-blocking delay for 2 seconds to keep JVM alive
}