Chapter 26 : UseCase23 - SharedFlow (Hot Streams)
Everything that we have seen until now was cold flows. Now we enter the world of "hot” flows. Cold flow means: Nothing runs until collected Each collector gets its own independent execution Flow re
Search for a command to run...
Articles tagged with #usecase
Everything that we have seen until now was cold flows. Now we enter the world of "hot” flows. Cold flow means: Nothing runs until collected Each collector gets its own independent execution Flow re
In this chapter we will focus on automatic cancellation of previous work when new data arrives. Concept flatMapLatest works like this: Upstream emits a value. A new inner flow starts. If upstream e
In UC13 you used flatMapConcat, which processed each stock one after another. In UC14 we use flatMapMerge(). This allows multiple inner flows to run at the same time.Now we upgrade from sequential exp
In real streams, values often repeat. But sometimes, we only care when the value actually changes. distinctUntilChanged() ensures that the same consecutive value is not emitted twice. It filters out d
Cold Flow : Understanding Laziness and Execution We now have a fully validated in-memory dataset: List<Stock> We will now understand Kotlin Flow from first principles. In this chapter our focus will b