Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumKotlincoroutine dispatchers contextSingle-choice MCQ

What does this code print, given that `launch` with no explicit dispatcher inherits the parent scope's context?

fun main() = runBlocking { launch { println("A: ${Thread.currentThread().name.contains("main")}") } launch(Dispatchers.Default) { println("B: ${Thread.currentThread().name.contains("main")}") } }