Dias
02/28/2019, 12:41 PMgildor
02/28/2019, 1:15 PMDias
02/28/2019, 2:08 PMsuspend fun callMany() = coroutineScope {
launch { callA() }
launch { callB() }
CoroutineScope(this.coroutineContext + Job()).launch {
callC()
}
}
this way when callA() and callB() fail, they make callMany() throw an error and cancel each other, but callC() continues. I want callC() to be cancelled when callA() or callB() fails, but if callC() fails it woudn't affect callA() or callB(). While preserving the rest of functionality