i would assume in #1 the scope gets captured inside the foorLoop, which isnt the case
f
Felix
11/29/2018, 8:23 PM
Why do you state that the
launch
in the first example doesn't use the scope from the
withContext
?
g
gildor
11/30/2018, 1:26 AM
+1 to Pedro. It should be IO dispatcher, I don’t see any problem with it
maybe you confused because IO and Default dispatchers actually share thread, just have different max amount of threads that they can use from shared pool
m
myanmarking
11/30/2018, 9:01 AM
idk, maybe its about the runblocking interaction. case #1 does nothing, case #2 runs all the launches in the loop
f
Felix
12/02/2018, 12:00 AM
I tried a very similar code and it works as expected.
g
gildor
12/02/2018, 12:31 AM
Yes, I agree with Pedro, it should work. Maybe you could show some self-contained example that reproduces this problem