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

Allow WTF timers to participate in the event loop #15557

Merged
merged 91 commits into from
Jan 29, 2025

Conversation

190n
Copy link
Contributor

@190n 190n commented Dec 3, 2024

What does this PR do?

WebKit has WTF::RunLoop and WTF::RunLoop::Timer. The latter is created in order to run GC at certain intervals. Since Bun's event loop is really in charge of timers, rather than the RunLoop, the GC timers would previously never run. This PR enables Bun to include those timers in the event loop and fire them at the right times.

This also includes the change from #14885 to release heap access while waiting for events.

TODO:

Requires oven-sh/WebKit#71 and #15328

How did you verify your code works?

CI

@robobun
Copy link

robobun commented Dec 3, 2024

Updated 6:35 PM PT - Jan 28th, 2025

@Jarred-Sumner, your commit 5e3b8ed has 2 failures in Build #10724:


🧪   try this PR locally:

bunx bun-pr 15557

@190n 190n mentioned this pull request Dec 6, 2024
@190n 190n mentioned this pull request Jan 25, 2025
@190n 190n marked this pull request as ready for review January 29, 2025 01:47
@Jarred-Sumner Jarred-Sumner merged commit af27f9e into main Jan 29, 2025
6 of 8 checks passed
@Jarred-Sumner Jarred-Sumner deleted the ben/wtf-timer-event-loop branch January 29, 2025 01:47
190n added a commit that referenced this pull request Feb 12, 2025
…rkQueue

We might revert this commit before merging. It's unclear if this is
the right approach or if we should keep PhonyWorkQueue. This way does
require manual event loop refs/unrefs in a bunch of places where
previously PhonyWorkQueue was handling it.
190n added a commit that referenced this pull request Feb 13, 2025
… real WorkQueue"

This reverts commit 5347f30. Crypto code will
continue using PhonyWorkQueue.
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.

3 participants