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

CLOVIS

06/11/2019, 3:56 AM
I'm reading Kotlin Flows and to me it sounds similar to Channels. Are they a replacement, a simpler implementation, or something else entirely that I didn't understand? https://medium.com/@elizarov/simple-design-of-kotlin-flow-4725e7398c4c
Hm their other article explains it better: Channels are used to communicate between coroutines and Flows are just Sequences that can suspend?
d

Dico

06/11/2019, 4:23 AM
Flows are designed such that they can be cold.
The consumer of elements (using
collect
) initiates the transaction
e

elizarov

06/11/2019, 6:07 AM
You might also want to familiarize yourself with difference between hot and cold streams by reading https://link.medium.com/dmcHXSWrqX
4 Views