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

rkeazor

06/09/2020, 7:57 AM
Hey Flow.zip works with hot flows correct?
e

elizarov

06/09/2020, 7:58 AM
Should work with all flows
❤️ 2
r

rkeazor

06/09/2020, 8:00 AM
So assuming you have 2 flows , and the second one emits a item before the first, does it just suspend until the first one emits?
e

elizarov

06/09/2020, 8:13 AM
Yes. It’s not related to the hotness/coldness of the flow.
zip
always works this way.
It has some internal buffering for performance reasons, though, so it will not suspend it immediately, but will buffer some emissions first (you can override default buffering if needed)
2 Views