Skip to content

Instantly share code, notes, and snippets.

@bernieperez
Created October 27, 2014 03:16
Show Gist options
  • Save bernieperez/8027231daddc7929fec8 to your computer and use it in GitHub Desktop.
Save bernieperez/8027231daddc7929fec8 to your computer and use it in GitHub Desktop.
// Does this stackoverflow NodeJS
function readMessage (queue, callback) {
setTimeout(function() { callback(queue); }, 0);
}
function testIt(count) {
readMessage(count, function (data) {
console.log(data);
testIt(data + 1);
});
}
console.log("Starting");
testIt(1);
console.log("Running");
// Nope! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment