Created
January 7, 2010 16:51
-
-
Save kriszyp/271364 to your computer and use it in GitHub Desktop.
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 posix = require("posix"); | |
var print = require("sys").puts; | |
var j = 0; | |
for(var i = 0;i < 100; i++){ | |
posix.stat("file" + i, process.O_RDONLY, 0666) // these files don't exist | |
.addErrback(function(e){ | |
j++; // only makes it to about 17 | |
print(j); | |
}) | |
.addCallback(function(){ | |
print("won't be called"); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment