I need to call a `suspend fun` on an object that h...
# coroutines
d
I need to call a
suspend fun
on an object that has a
SupervisorScope
, I just want to cancel what is being done in that function without cancelling the entouring scope. Is it a good practice to use
launch
or
async
on that function just to have a handle on cancelling it? Also, I don't want it to really be run async, this function should suspend the caller until it is finished everything... So I would need
suspend fun doWork() = coroutineScope { launch { ... } }
?