Skip to content

Instantly share code, notes, and snippets.

@adohe-zz
Created February 15, 2014 16:57
Show Gist options
  • Save adohe-zz/9021941 to your computer and use it in GitHub Desktop.
Save adohe-zz/9021941 to your computer and use it in GitHub Desktop.
node.js event loop
var fs = require('fs');
setTimeout(function() {
console.log('first timer...');
setTimeout(function() {
console.log('second timer...');
}, 0);
fs.stat('EventLoop.js', function() {
console.log('I/O');
});
setImmediate(function() {
console.log('setImmediate');
});
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment