1 /*
2  * Copyright 2016-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3  */
4 
5 // This file was automatically generated from coroutine-context-and-dispatchers.md by Knit tool. Do not edit.
6 package kotlinx.coroutines.guide.exampleContext02
7 
8 import kotlinx.coroutines.*
9 
<lambda>null10 fun main() = runBlocking<Unit> {
11     launch(Dispatchers.Unconfined) { // not confined -- will work with main thread
12         println("Unconfined      : I'm working in thread ${Thread.currentThread().name}")
13         delay(500)
14         println("Unconfined      : After delay in thread ${Thread.currentThread().name}")
15     }
16     launch { // context of the parent, main runBlocking coroutine
17         println("main runBlocking: I'm working in thread ${Thread.currentThread().name}")
18         delay(1000)
19         println("main runBlocking: After delay in thread ${Thread.currentThread().name}")
20     }
21 }
22