flyd icon indicating copy to clipboard operation
flyd copied to clipboard

Fix ending a stream while updating

Open nordfjord opened this issue 1 year ago • 6 comments

Fixes #228 which highlighted an edge case that happens when a stream is ended while being processed in very specific circumstances. In those circumstances the end stream will be triggered before the listeners because it's updated is queued before the listener updates.

To solve for this we add a toEnd array into which the end stream of the current stream will be pushed to if it's updated while while the main stream is updated (that's a convoluted sentence, it's a convoluted data flow, not sure how to communicate this properly)

nordfjord avatar Jan 31 '24 03:01 nordfjord