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.exampleContext03 7 8 import kotlinx.coroutines.* 9 lognull10fun log(msg: String) = println("[${Thread.currentThread().name}] $msg") 11 12 fun main() = runBlocking<Unit> { 13 val a = async { 14 log("I'm computing a piece of the answer") 15 6 16 } 17 val b = async { 18 log("I'm computing another piece of the answer") 19 7 20 } 21 log("The answer is ${a.await() * b.await()}") 22 } 23