You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
It appears to me that after upgrading to 0.10.34, a setInterval() call that is unref()ed will only fire once and then not recur.
Example code:
var timer = setInterval(function() {
console.log("timer fired");
}, 1000);
timer.unref();
console.log("Unrefed timer should fire every 1 second");
setTimeout(function() {
console.log("Exiting after 5 seconds");
process.exit();
}, 5000);
Output on 0.10.33, which is as expected, and 0.10.34, which only fires once and then doesn't recur:
ploer-macbook-4:timer_test ploer$ node --version
v0.10.33
ploer-macbook-4:timer_test ploer$ node timer_test.js
Unrefed timer should fire every 1 second
timer fired
timer fired
timer fired
timer fired
Exiting after 5 seconds
ploer-macbook-4:timer_test ploer$ node --version
v0.10.34
ploer-macbook-4:timer_test ploer$ node timer_test.js
Unrefed timer should fire every 1 second
timer fired
Exiting after 5 seconds
ploer-macbook-4:timer_test ploer$
Not sure if this is related to issue #8897, but the symptoms seem quite different, and although I've encountered both of them they were in different circumstances.