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
Affected core subsystem(s)

timers