1 // This file was automatically generated from coroutine-context-and-dispatchers.md by Knit tool. Do not edit.
2 package kotlinx.coroutines.guide.exampleContext02
3 
4 import kotlinx.coroutines.*
5 
<lambda>null6 fun main() = runBlocking<Unit> {
7     launch(Dispatchers.Unconfined) { // not confined -- will work with main thread
8         println("Unconfined      : I'm working in thread ${Thread.currentThread().name}")
9         delay(500)
10         println("Unconfined      : After delay in thread ${Thread.currentThread().name}")
11     }
12     launch { // context of the parent, main runBlocking coroutine
13         println("main runBlocking: I'm working in thread ${Thread.currentThread().name}")
14         delay(1000)
15         println("main runBlocking: After delay in thread ${Thread.currentThread().name}")
16     }
17 }
18