Created
March 18, 2021 16:35
-
-
Save jaozinfs/0bd12d00783b75436247a0159d904593 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val coldFlowExemple = (1..3).asFlow() | |
coldFlowExemple.onEach { | |
println("delay") | |
delay(300) | |
}.collect { value -> | |
println("Collector 1 - ${value}") | |
} | |
println("--") | |
coldFlowExemple.collect { value -> println("Collector 2 - ${value}") } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment