0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/mjsunit/test-eio-race4.js
Ryan Dahl 53413598b6 Fix another problem with the EIO interface
Should call eio_poll() when given a done_poll signal as well.

Bug report and test case by Kris Zyp <kriszyp@gmail.com>
2010-01-08 22:20:23 -08:00

20 lines
387 B
JavaScript

process.mixin(require("./common"));
var N = 100;
var j = 0;
for (var i = 0; i < N; i++) {
posix.stat("does-not-exist-" + i) // these files don't exist
.addErrback(function (e) {
j++; // only makes it to about 17
puts("finish " + j);
})
.addCallback(function () {
puts("won't be called");
});
}
process.addListener("exit", function () {
assert.equal(N, j);
});