Only thing I’m missing with Flow is the ability to...
# coroutines
s
Only thing I’m missing with Flow is the ability to add to a flow that has a terminal operator running
o
why can't you just make the source take from a Channel or something?
s
Could do, but wouldn’t that defeat the point of a cold stream by stapling a cold stream onto a hot one?
o
you can do the same thing with a flow
but you can't "add" to that
and really, a
Channel
that's constructed manually isn't really a producer
s
I did have the idea of using a list whose iterator will update with elements added during iteration, and then creating a flow out of that list
o
that's essentially what I'm suggesting, but with the thread-safe Channel mechanism