0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/test/simple/test-eio-race2.js
2010-02-25 11:41:11 -08:00

23 lines
480 B
JavaScript

process.mixin(require("../common"));
var testTxt = path.join(fixturesDir, "x.txt");
var fs = require('fs');
setTimeout(function () {
// put this in a timeout, just so it doesn't get bunched up with the
// require() calls..
N = 30;
for (var i=0; i < N; i++) {
puts("start " + i);
fs.readFile(testTxt, function(err, data) {
if (err) {
puts("error! " + e);
process.exit(1);
} else {
puts("finish");
}
});
}
}, 100);