blob: 32d73c1a019f551dfcd1ee2ca9d6298aebbce460 [file] [log] [blame]
package examples
import kotlinx.coroutines.experimental.*
fun main(args: Array<String>) = runBlocking<Unit> {
val job = launch(CommonPool) { // create new coroutine and keep a reference to its Job
delay(1000L)
println("World!")
}
println("Hello,")
job.join() // wait until child coroutine completes
}