refactor(core): internal tracker of pending tasks during initial rendering#49576
refactor(core): internal tracker of pending tasks during initial rendering#49576AndrewKushnir wants to merge 1 commit into
Conversation
|
This can also be leveraged by the changes in #49546 to avoid setTimeouts and be more zoneless-ready. // cc @alan-agius4 |
6216a59 to
a30aed1
Compare
a30aed1 to
9272639
Compare
9272639 to
7d7b363
Compare
25d8f66 to
c4cdc40
Compare
|
Update: after a conversation with @alan-agius4, we decided that PR #49546 will land as it (without using the class from this PR). In conjunction with this PR, this should be sufficient for applications that use ZoneJS: both routing (including lazy-loaded routes) and data fetches (via |
jessicajaniuk
left a comment
There was a problem hiding this comment.
LGTM! I like how clean the pending tasks implementation is.
reviewed-for: fw-core, fw-platform-server, public-api
…ering This commit implements a simple tracker of the pending tasks during initial rendering. The class allows adding and removing tasks from the set. The class also exposes a promise that gets resolved once the last task is removed. This tracker is needed to keep track of ongoing processes like Router navigation (and potentially HTTP requests) and acts as a signaling mechanism to SSR and hydration that the application is in the "stable" state and a serialization can be performed. This class would also act as a future replacement for the `ApplicationRef.isStable` for zoneless applications.
c4cdc40 to
0cddae6
Compare
|
Caretaker note: TGP is "green", the PR is ready for merge after @atscott's review (if there are no blockers identified during the review). |
|
This PR was merged into the repository by commit 478c5ac. |
|
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. |
This commit implements a simple tracker of pending tasks. The class allows adding and removing tasks from the set. The class also exposes a promise that gets resolved once the last task is removed.
This tracker is needed to keep track of ongoing processes like Router navigation (and potentially HTTP requests) and acts as a signaling mechanism to SSR and hydration that the application is in the "stable" state and a serialization can be performed.
This class would also act as a future replacement for the
ApplicationRef.isStablefor zoneless applications.PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?