Skip to content

timers: add hasRef method to Timeout & Immediate

Provide a way to check whether the current timer or immediate is refed. This was done as per request from @Fishrock123 due to the removal of _handle from unrefed timers.

The method name was chosen to match what used to be available on the _handle — unlike a getter it should also make it clear that it's not possible to change it by trying to assign.

(Since it depends on a semver-major PR, I'm labeling this as such too.)

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

Merge request reports

Loading