nicholasnet
04/06/2021, 12:03 AMsuspend fun test() : Response = coroutineScope {
launch {
doSomething()
}
Response(“pass”)
}
Will doSomething will keep on running in background once Response is returned. I have used async but not launchDariusz Kuc
04/06/2021, 1:24 AMnicholasnet
04/06/2021, 1:52 AMnicholasnet
04/06/2021, 2:26 AMCoroutineScope(Dispatchers.Default).launch {
doSomething()
}
Are there any problem with this approach.Dariusz Kuc
04/06/2021, 3:01 AMnicholasnet
04/06/2021, 1:06 PMDariusz Kuc
04/06/2021, 1:50 PM