Hi everyone ! I have a large number of flows and only want to collect up to N flows at once. Is there a way to apply some kind of LRU caching of flows and stop collecting them after being evicted from the cache ? I previously implemented that using `BroadcastChannel`s but since they are deprecated I have to find a solution with
SharedFlow
, which has no
close
method...
d
Dominaezzz
12/04/2021, 10:01 PM
No built in way to do that. You'll have to orchestrate it yourself.
You probably want a custom
SharingStarted
I think.
j
Joakim Forslund
12/05/2021, 9:07 AM
you can create this by making use of channelFlow {...} and creating an extension which does what you are talking about