-
Notifications
You must be signed in to change notification settings - Fork 26.3k
fix(core): release hasPendingTasks
observers
#59723
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
fix(core): release hasPendingTasks
observers
#59723
Conversation
ca940de
to
e1bd64b
Compare
e1bd64b
to
733de79
Compare
733de79
to
d88e914
Compare
d88e914
to
e765e0a
Compare
From the tests' point of view, it looks like very breaking. |
Yeah, unfortunately this is exceptionally breaking. |
This unfortunately is not landable due to the breaking nature of this change. Sorry, @arturovt. |
e765e0a
to
dda22fe
Compare
dda22fe
to
50467bb
Compare
25f9b55
to
590f396
Compare
packages/core/src/pending_tasks.ts
Outdated
* In case the service is about to be destroyed, return a self-completing observable. | ||
* Otherwise, return the observable that emits the current state of pending tasks. | ||
*/ | ||
safeHasPendingTasks(): Observable<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's instead make pendingTasks
private and expose hasPendingTasks
as the value and hasPendingTasksObservable
as the observable version. There's no need to have a public "safeHasPendingTasks" along with an unsafe one that might bite your hand off.
8c3d1d2
to
df3c4ee
Compare
df3c4ee
to
eb17e98
Compare
@arturovt Looks like this still has real failing tests. Can you address them? |
In this commit, we unsubscribe the `hasPendingTasks` subject to remove all active observers and enable granular garbage collection, as users may forget to unsubscribe manually when subscribing to `isStable`.
eb17e98
to
1bc7d7e
Compare
@thePunderWoman fixed unit tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reviewed-for: public-api, fw-general
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-for: public-api
This PR was merged into the repository by commit 1c7b356. The changes were merged into the following branches: main |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
In this commit, we unsubscribe the
hasPendingTasks
subject to remove all active observers and enable granular garbage collection, as users may forget to unsubscribe manually when subscribing toisStable
.