1 // This file was automatically generated from exception-handling.md by Knit tool. Do not edit. 2 package kotlinx.coroutines.guide.exampleExceptions03 3 4 import kotlinx.coroutines.* 5 <lambda>null6fun main() = runBlocking { 7 val job = launch { 8 val child = launch { 9 try { 10 delay(Long.MAX_VALUE) 11 } finally { 12 println("Child is cancelled") 13 } 14 } 15 yield() 16 println("Cancelling child") 17 child.cancel() 18 child.join() 19 yield() 20 println("Parent is not cancelled") 21 } 22 job.join() 23 } 24