...

/

Solution: Job and Awaiting Children

Solution: Job and Awaiting Children

See the solution to the challenge presented in the last lesson.

We'll cover the following...

Solution

The solution to the challenge we just solved is as follows.

fun main(): Unit = runBlocking {
    val job1 = launch {
       delay(1000)
       println("Educative")
   }
   val job2 = launch {
       delay(2000)
       println("Inc.")
   }

   job1.join()
   job2.join()
   println("Completed")
}
Solution of the challenge

Here is a line–by–line ...