what is the idiomatic way to implement a resources pool with Flows?
let's say it's a list of numbers 1..10 that can grow and shrink
resources.borrow { resource -> ... }
then once a resource is done being borrowed, it is returned to the pool, if no resources are available, it waits until another borrow is completed
a secondary thread can add resources or remove resources from the pool if they are no longer valid
I think this is possible with Channels, but would like to use a cold flow.