bun icon indicating copy to clipboard operation
bun copied to clipboard

Allow WTF timers to participate in the event loop

Open 190n opened this issue 1 year ago • 1 comments

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 GarbageCollectionController from event_loop.zig

Requires oven-sh/WebKit#71 and #15328

How did you verify your code works?

TODO

190n avatar Dec 03 '24 21:12 190n

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

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


🧪   try this PR locally:

bunx bun-pr 15557

robobun avatar Dec 03 '24 21:12 robobun