-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Closed
Labels
timersIssues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.Issues and PRs related to the timers subsystem / setImmediate, setInterval, setTimeout.
Description
This line:
clearTimeout(timer);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 the global object.
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._repeat is not a function.
Could we make a small tweak to timers.js to have line 290 reference a reliable internal reference for clearTimeout?
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.