https://kotlinlang.org logo
#coroutines
Title
# coroutines
t

tseisel

12/12/2019, 10:52 AM
Currently, when using
flow.produceIn(aScope)
, if the source flow terminates with an exception then the
produce
coroutines fails and cancels the scope and its parent. Wouldn't it be better if it only cancelled the resulting
ReceiveChannel
?
b

bdawg.io

12/12/2019, 6:30 PM
That's the contract if structured concurrency. If you don't want it to cancel the parent, consider passing a
SupervisorScope
instead
7 Views