Zoltan Demant
08/20/2022, 6:13 AMCoroutineScope
, but I need to do it inside a suspending block of my scope. This feels like a really bad idea, is there a better approach?
scope.launch {
// Do some suspending work
scope.coroutineContext.cancelChildren()
// Ordering becomes very important - any code from here and on is never executed.
// This isnt a problem by itself as I dont have any more code here, but it has introduced very subtle
// bugs in the past
}