Am I the only one who thinks it is strange you cannot close
MutableSharedFlow
? Seems that cancelling all listeners (so parent scope) is the only way for this program to close 😛
https://pl.kotl.in/EzyFeqARz
j
Joffrey
01/11/2022, 9:18 AM
I was pretty puzzled by it at first, too. But now I kinda understand the reason. Depending on the
started
strategy, the shared flow might stop/re-collect the underlying flow arbitrarily (when using
shareIn
), so the end of the flow is not really the end.
To be honest what I miss most is that errors in the source flow don't propagate to the collectors, which I find kinda apalling. I think it would be nice to at least have a built-in way to materialize/dematerialize both errors and completions.
g
gildor
01/11/2022, 9:21 AM
built-in way to materialize/dematerialize both errors and completions