How do I create a non-blocking asynchronous function? Below is what I'm trying to achieve but my program is still blocking...
var sys = require("sys");
function doSomething() {
sys.puts("why does this block?");
while(true);
}
setTimeout(doSomething,0);
setTimeout(doSomething,0);
setTimeout(doSomething,0);
sys.puts("main");