xref: /aosp_15_r20/external/kotlinx.coroutines/kotlinx-coroutines-core/jvm/test/guide/example-basic-01.kt (revision 7a7160fed73afa6648ef8aa100d4a336fe921d9a)
1 // This file was automatically generated from coroutines-basics.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleBasic01
3 
4 import kotlinx.coroutines.*
5 
<lambda>null6 fun main() = runBlocking { // this: CoroutineScope
7     launch { // launch a new coroutine and continue
8         delay(1000L) // non-blocking delay for 1 second (default time unit is ms)
9         println("World!") // print after delay
10     }
11     println("Hello") // main coroutine continues while a previous one is delayed
12 }
13