Is it possible to have a MutableStateFlow that con...
# coroutines
t
Is it possible to have a MutableStateFlow that continuously produces values? I would like to zip it with another flow as I don't want the resulting flow to be limited by how often my MutableStateFlow gets mutated.
Copy code
val foo = MutableStateFlow(0)
val bar = flow { ... }
foo.zip(bar) { ... } // I don't want the resulting flow to be limited by how often foo is updated.
solved 1
g
what are you traying to achieve?
what is "continuously produces values"? It produces only one value
t
Oh wait. I should use
combine
shouldn't I?
g
yes, exactly what I wanted to write, looks that zip is just wrong operator for your case
thank you color 1