<lambda>null1 // This file was automatically generated from coroutine-context-and-dispatchers.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleContext07
3 
4 import kotlinx.coroutines.*
5 
6 fun main() = runBlocking<Unit> {
7     // launch a coroutine to process some kind of incoming request
8     val request = launch {
9         repeat(3) { i -> // launch a few children jobs
10             launch  {
11                 delay((i + 1) * 200L) // variable delay 200ms, 400ms, 600ms
12                 println("Coroutine $i is done")
13             }
14         }
15         println("request: I'm done and I don't explicitly join my children that are still active")
16     }
17     request.join() // wait for completion of the request, including all its children
18     println("Now processing of the request is complete")
19 }
20