Skip to content
Discussion options

You must be logged in to vote

@yaacovCR Correctly forwarding .return() is essential for resource cleanup (closing DB connections, stopping subscriptions).
If the upstream source supports return, the executor should definitely call it when the downstream consumer aborts. This is standard AsyncIterator behavior in JS.
If the current implementation drops it "in some cases" (like filtering), that sounds like a leak/bug that should be addressed to ensure robust stream termination.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yaacovCR
Comment options

yaacovCR Apr 5, 2026
Maintainer Author

Answer selected by yaacovCR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants