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

Remove "periodic yield" system #518

Merged
merged 1 commit into from
May 4, 2023
Merged

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented May 4, 2023

The "periodic yield" system exists in order to avoid calling setTimeout(..., smallValue) repeatedly in situations where it might take a long time, such as when the tab is in the background.
See https://developer.mozilla.org/en-US/docs/Web/API/setTimeout#timeouts_in_inactive_tabs

This PR removes this system and instead automatically adjusts the behavior of the code based on much time setTimeout actually took. This is an overall cleaner and more robust way to do it.

@tomaka tomaka added this pull request to the merge queue May 4, 2023
Merged via the queue into smol-dot:main with commit 469dbe8 May 4, 2023
@tomaka tomaka deleted the rm-periodic-yield branch May 4, 2023 12:59
tomaka added a commit to tomaka/smoldot that referenced this pull request May 4, 2023
tomaka added a commit that referenced this pull request May 4, 2023
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.

1 participant