https://kotlinlang.org logo
Title
b

Bernhard

02/04/2019, 2:12 PM
does runBlocking create a new coroutine scope so that your jobs inside of it won’t leak on exceptions
ok, judging from the example at the bottom https://kotlinlang.org/docs/reference/coroutines/composing-suspending-functions.html#structured-concurrency-with-async it seems that creating a scope is still necessary
g

gildor

02/04/2019, 3:37 PM
runBlocking provides own scope, so create additional scope is not necessary
All examples from this section create scope because start coroutine from suspend function
In case of error runBlocking will cancel child coroutines and throw an exception
b

Bernhard

02/04/2019, 6:41 PM
thank you!