-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
minor issue with timers.js #2493
Copy link
Copy link
Closed
Labels
timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Metadata
Metadata
Assignees
Labels
timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
This line:
Instead of calling
exports.clearTimeout(..), or even better, having a local identifier pointing at that function, this line is making a call that relies on resolving to the identifier on theglobalobject.That works OK until a lib like mine, stable-timers, comes along and replaces those global timer API methods. When using my lib, I'm getting race conditions where sometimes this line 270 throws an exception that
timer._repeatis not a function.Could we make a small tweak to timers.js to have line 290 reference a reliable internal reference for
clearTimeout?