Skip to content

refactor(core): Update callback schedulers to cancel pending timers#57186

Closed
atscott wants to merge 1 commit intoangular:mainfrom
atscott:callbackcancellation
Closed

refactor(core): Update callback schedulers to cancel pending timers#57186
atscott wants to merge 1 commit intoangular:mainfrom
atscott:callbackcancellation

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Jul 29, 2024

Rather than leaving the timers around as no-ops, this commit updates the logic to also attempt to clear or cancel the timers. This is helpful for the eventual goal of running the scheduler in the fakeAsync zone (if the test is running in fakeAsync) rather than scheduling in the root zone and making it impossible to flush.

@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Jul 29, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 29, 2024
@atscott atscott added the target: patch This PR is targeted for the next patch release label Jul 29, 2024
Rather than leaving the timers around as no-ops, this commit updates the
logic to also attempt to clear or cancel the timers. This is helpful for
the eventual goal of running the scheduler in the `fakeAsync` zone (if
the test is running in `fakeAsync`) rather than scheduling in the root
zone and making it impossible to flush.
@atscott atscott force-pushed the callbackcancellation branch from 4ac7b66 to 5ea3875 Compare July 29, 2024 17:39
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jul 29, 2024
thePunderWoman pushed a commit that referenced this pull request Jul 30, 2024
…57186)

Rather than leaving the timers around as no-ops, this commit updates the
logic to also attempt to clear or cancel the timers. This is helpful for
the eventual goal of running the scheduler in the `fakeAsync` zone (if
the test is running in `fakeAsync`) rather than scheduling in the root
zone and making it impossible to flush.

PR Close #57186
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit b558f99.

The changes were merged into the following branches: main, 18.1.x

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants