xref: /aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/guide/example-basic-05.kt (revision 7a7160fed73afa6648ef8aa100d4a336fe921d9a)
1 // This file was automatically generated from coroutines-basics.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleBasic05
3 
4 import kotlinx.coroutines.*
5 
<lambda>null6 fun main() = runBlocking {
7     val job = launch { // launch a new coroutine and keep a reference to its Job
8         delay(1000L)
9         println("World!")
10     }
11     println("Hello")
12     job.join() // wait until child coroutine completes
13     println("Done")
14 }
15