Skip to content

Instantly share code, notes, and snippets.

@manlycode
Created November 16, 2010 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manlycode/702240 to your computer and use it in GitHub Desktop.
Save manlycode/702240 to your computer and use it in GitHub Desktop.
process.nextTick
var sys = require('sys');
function printNowAndLater(message) {
sys.puts(message);
process.nextTick(function() {
sys.puts("Backgrounded Message: " + message);
});
};
printNowAndLater("Hello");
printNowAndLater("World");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment