Can someone ELI5 hot streams vs cold streams? I'm ...
# coroutines
k
Can someone ELI5 hot streams vs cold streams? I'm trying to wrap my head around Flow and I don't quite get it
o
hot streams start producing when you create them, e.g. with
produce
-- it immediately starts generating elements, although it will stop at the first
yield
but cold streams don't start producing until their terminal operation is called -- you can
map
them,
filter
them, etc., and no processing happens, until you call something like
collect
👍 3
👌 2
k
Oh well that's easy lol. When I was searching for explanations the articles got really into the weeds on the issue...
Can I ask why SQL queries are possible to be represented at a
Flow
in SQLDelite? I'm assuming its to make queries observable similar to Room?
As seen here
o
yea, Flow is an observable replacement
k
That's precisely the explanation I needed, thanks
z