Skip to content

src: remove TimerWrap

Remove TimerWrap in favour of uv_timer_t handle stored on the Environment, more similar to how Immediates currently function. Since there's now only a single TimerWrap, it doesn't really make much sense for it to exist at all (hence this PR). In addition, the async stack from the TimerWrap is actually not desirable and every single public module that works with async hooks seems to filter it out anyway.

I've also done a quick scan of npm modules and I could not find a single use case of TimerWrap.now(), which would be the only reason to keep it publicly available. It's also currently impossible for user land to use the TimerWrap given how OnTimeout is implemented (it can only process our own internal lists).

This will make it possible to continue further improving our Timers architecture and C++ code.

Fixes: https://github.com/nodejs/node/issues/10154

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Merge request reports

Loading