Skip to content

Instantly share code, notes, and snippets.

@shinout
Created October 12, 2011 15:28
Show Gist options
  • Save shinout/1281523 to your computer and use it in GitHub Desktop.
Save shinout/1281523 to your computer and use it in GitHub Desktop.
registering N functions in event loops
var count = 0;
var N = 10000000;
var f = function(v) {
count++;
};
for (var i=0; i<N; i++) process.nextTick(f);
process.nextTick(function() {
console.log(count);
});
@shinout
Copy link
Author

shinout commented Oct 12, 2011

N = 100000000;

これでallocation errorになってしまった。。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment