Created
May 6, 2012 17:03
-
-
Save bjouhier/2623314 to your computer and use it in GitHub Desktop.
luvmonkey program that does not exit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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