Skip to content

Instantly share code, notes, and snippets.

@oberhamsi
Created January 26, 2012 12:10
Show Gist options
  • Select an option

  • Save oberhamsi/1682502 to your computer and use it in GitHub Desktop.

Select an option

Save oberhamsi/1682502 to your computer and use it in GitHub Desktop.
var {Worker} = require("ringo/worker")
var {setInterval} = require("ringo/scheduler");
if (require.main === module) {
var w = new Worker(module.id);
w.terminate();
} else {
setInterval(function() {
print('alive');
}, 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment