Created
January 30, 2013 17:53
-
-
Save isaacs/4675142 to your computer and use it in GitHub Desktop.
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
diff --git a/src/node.js b/src/node.js | |
index 9fc68e4..58ab066 100644 | |
--- a/src/node.js | |
+++ b/src/node.js | |
@@ -454,10 +454,10 @@ | |
var tock = { callback: callback }; | |
if (process.domain) tock.domain = process.domain; | |
- nextTickQueue.push(tock); | |
- if (nextTickQueue.length) { | |
+ if (nextTickQueue.length === 0) { | |
process._needTickCallback(); | |
} | |
+ nextTickQueue.push(tock); | |
}; | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if I remember correctly, it's lest costly for v8 to do:
Morphing an object after it's created should be avoided when possible.