Hey folks, I have a sort of conceptual question. I...
# flow
g
Hey folks, I have a sort of conceptual question. I'm looking to implement a queue with backpressure that can be modified asynchronously. So what we have now, we implemented it as a Hot Flow, the collector dictates how fast the items in the queue get processed, but while collecting 1 item, they can still for example clear the rest of the queue and suspend waiting for the next item which would be queued at some point later. We did this in a somewhat silly implementation using
SharedFlow
, but I was wondering if Flows are the correct API to represent this? Or if this is a problem other people have thought about before or not? There is no interface that indicates that a flow is hot right? Would it make more sense to my implementation to be a
Channel
for example?