bun
bun copied to clipboard
Allow WTF timers to participate in the event loop
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:
- [x] fix todos in the code
- [ ] performance testing
- [x] make the test suite reasonable (probably just check #14982 does not regress)
- [ ] see if we can get rid of
GarbageCollectionControllerfromevent_loop.zig
Requires oven-sh/WebKit#71 and #15328
How did you verify your code works?
TODO
Updated 6:35 PM PT - Jan 28th, 2025
:x: @Jarred-Sumner, your commit 5e3b8ed588d2d2b406187bbd62ea5e193c097f0f has 2 failures in Build #10724:
test/js/bun/util/filesink.test.ts- timeout on 🪟 2019 x64-baselinetest/js/bun/util/filesink.test.ts- timeout on 🪟 2019 x64test/cli/install/bun-install-registry.test.ts- 2 failing on 🪟 2019 x64
🧪 try this PR locally:
bunx bun-pr 15557