how can i call launch from a suspend method metho...
# coroutines
c
how can i call launch from a suspend method method and not wait for it? if i wrap the launch call with coroutineScope {} it waits for the job to finish
l
You need a different scope since you want to escape structured concurrency.
4
c
can i just pass the scope that runBlocking creates around or is that a terrible idea?
l
@christophsturm If that
runBlocking
is the one from the
main
function, it's not a bad idea. You need to ensure the
runBlocking
is supposed to live at least as long as the coroutine you want to launch.
c
thanks. thats exactly what i want then