Skip to content
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: don't execute rescheduled animation frame and asap actions in flush #5399

Merged
merged 4 commits into from
Apr 22, 2020

Conversation

cartant
Copy link
Collaborator

@cartant cartant commented Apr 21, 2020

Description:

This PR fixes a problem with the animationFrame and asap schedulers. The loop initialization logic in the flush implementation for both schedulers was incorrect and resulted in the execution of any actions that were rescheduled when executed.

This fixes the problem of the animation frame scheduler effecting too many notifications - see #4972. Regarding that issue, the of(0, animationFrameScheduler).pipe(repeat()) snippet 'works' only because the implicit unsubscription cancels the action's additional requestAnimationFrame call.

The PR adds failing tests for both schedulers and then fixes the problems.

Related issue (if exists): #4972 and #5397

@benlesh benlesh merged commit 33c9c8c into ReactiveX:master Apr 22, 2020
@cartant cartant deleted the issue-4972 branch September 24, 2020 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants