name: Android Basics Unit 4 issue
about: Report problems with the Android Basics Unit 4 codelabs
title: 'Android Basics Unit 4 issue:'
labels: ''
assignees: ''
URL of codelab
In which task and step of the codelab can this issue be found?
import kotlinx.coroutines.*
fun main() {
repeat(3) {
GlobalScope.launch {
println("Hi from ${Thread.currentThread()}")
}
}
}
Describe the problem
There is no output that is mentioned below:
Hi from Thread[DefaultDispatcher-worker-2@coroutine#2,5,main]
Hi from Thread[DefaultDispatcher-worker-1@coroutine#1,5,main]
Hi from Thread[DefaultDispatcher-worker-1@coroutine#3`,5,main]
If I add a Thread delay outside of globalScope lambda then it produces:
Hi from Thread[DefaultDispatcher-worker-1,5,main]
Hi from Thread[DefaultDispatcher-worker-1,5,main]
Hi from Thread[DefaultDispatcher-worker-1,5,main]
if I add delay(50) inside the lambda it doesnt do anything
Steps to reproduce?
Go to...
Click on...
See error...
VersionsAndroid Studio version:API version of the emulator:
Additional informationInclude screenshots if they would be useful in clarifying the problem.
name: Android Basics Unit 4 issue about: Report problems with the Android Basics Unit 4 codelabs title: 'Android Basics Unit 4 issue:' labels: '' assignees: ''
URL of codelab
In which task and step of the codelab can this issue be found?
Describe the problem There is no output that is mentioned below: Hi from Thread[DefaultDispatcher-worker-2@coroutine#2,5,main] Hi from Thread[DefaultDispatcher-worker-1@coroutine#1,5,main] Hi from Thread[DefaultDispatcher-worker-1@coroutine#3`,5,main]
If I add a Thread delay outside of globalScope lambda then it produces:
if I add delay(50) inside the lambda it doesnt do anything
Steps to reproduce?
Versions Android Studio version: API version of the emulator:
Additional information Include screenshots if they would be useful in clarifying the problem.