I'm wondering if `ResourceScope.ManagedCoroutineSc...
# arrow-contributors
p
I'm wondering if
ResourceScope.ManagedCoroutineScope
should get cancelled when released with a failure, rather than completeExceptionally with the resource scope's failure (similarly to the way sibling jobs are cancelled when a sibling fails).
y
AFK, but I think we basically want (with
block: suspend CoroutineScope.() -> Unit
):
Copy code
resourceScope {
  block(ManagedCoroutineScope())
}
To be equivalent to:
Copy code
coroutineScope(block)
So if the behavior currently matches, that's why, and if it doesn't, then I'll file a bug 😅
☝️ 1
s
@phldavies I can see why that would be useful. Could you share your use-cases? If we introduce it I guess a new name is appropriate rather than a flag? 🤔
p
I'd have to look back, but one off the top of my head is providing a scope for launching a kafka receiver/flow into.