Created
August 4, 2014 07:10
-
-
Save misterdjules/5ef3b7c5b0a7334a6e09 to your computer and use it in GitHub Desktop.
Repro for https://github.com/joyent/node/issues/8065 but with internal timers.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var timers = require('timers'); | |
myInternalTimeout = function(callback, after) { | |
var timer = {}; | |
timers.enroll(timer, after); | |
timers._unrefActive(timer); | |
timer._onTimeout = callback; | |
return timer; | |
}; | |
function foo() { console.log('foo'); } | |
var myInternalTimer = myInternalTimeout(foo, 300.1); | |
setInterval(function() { timers._unrefActive(myInternalTimer); }, 350); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment