Skip to content

Instantly share code, notes, and snippets.

@bjouhier
Created May 6, 2012 17:03
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 bjouhier/2623314 to your computer and use it in GitHub Desktop.
Save bjouhier/2623314 to your computer and use it in GitHub Desktop.
luvmonkey program that does not exit
var Timer = require('uv').Timer;
function foo() {
var timer = new Timer();
timer.start(1000, 0, function(err) {
f.send("ok");
f.close();
})
var r = yield;
print("got " + r);
yield;
}
var f = foo();
f.next();
print("started");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment