timers: runtime-deprecate {un}enroll() by Fishrock123 · Pull Request #18066 · nodejs/node (original) (raw)
This was never a Very Good API, and generally just left so many open ends for inconsistent behavior. The "optimization" benefit of this API is little to none. Makes a starting step towards removing it so that in the future, timers, especially in their async_hooks interactions, can be simplified.
For posterity: enroll()
& unenroll()
have been exposed since 0.1.very-early, predating setTimeout()
& clearTimeout()
in Node. They have never been documented.
@nodejs/tsc
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes- tests and/or benchmarks are included
- documentation is changed or added
- commit message follows commit guidelines
Affected core subsystem(s)
timers