Let's do some work

Report a typo

There are two functions doLotsOfWork1 and doLotsOfWork2, which do something and last for 5 milliseconds both. You need to wait for the result of their computations.

Write a program in Kotlin
fun doAllTheJob() {
println("Working...")

val firstJob = GlobalScope.launch {
doLotsOfWork1() // 5 ms
}

val secondjob = GlobalScope.launch {
doLotsOfWork2() // 5 ms
}

println("Finishing")
}
___

Create a free account to access the full topic