Hi everyone ! I have a large number of flows and o...
# coroutines
t
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
No built in way to do that. You'll have to orchestrate it yourself. You probably want a custom
SharingStarted
I think.
j
you can create this by making use of channelFlow {...} and creating an extension which does what you are talking about