xref: /aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/guide/example-basic-02.kt (revision 7a7160fed73afa6648ef8aa100d4a336fe921d9a)
1 // This file was automatically generated from coroutines-basics.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleBasic02
3 
4 import kotlinx.coroutines.*
5 
<lambda>null6 fun main() = runBlocking { // this: CoroutineScope
7     launch { doWorld() }
8     println("Hello")
9 }
10 
11 // this is your first suspending function
doWorldnull12 suspend fun doWorld() {
13     delay(1000L)
14     println("World!")
15 }
16