-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add close state to finally operator? #2823
Comments
One observation is that it's like passing a materialized |
I'm thinking how could this work with #3122 (Using AbortSignal and AbortController). If the |
I've stumbled upon exactly the same issue as described here where I wanted to know if the chain is being disposed because all observers unsubscribed or whether the chain completed. I made a custom operator for this because it seems to be a pretty simple thing and like @benlesh said this would be a non-breaking change if https://stackblitz.com/edit/rxjs-scmt4v?file=index.ts
This prints the following output to console:
|
@martinsik We wound up with basically the same thing. I think you need to wrap your operator body in a |
@matthewwithanm You're right, it should be wrapped inside |
This has gone pretty stale, and I don't think there's much appetite to add this at the moment. Closing for now. |
@matthewwithanm presented a scenerio here that I think we can address with a non-breaking change to the finally operator.
That is that we could provide, as an argument to
finally
's callback, a flag of some sort to declare whether or not it was finalized because oferror
,complete
orunsubscribe
.Strawman:
The only additional thing I can think of is additionally providing the error in the event of an error, but I'm not sure how helpful that would be.
Thoughts?
The text was updated successfully, but these errors were encountered: