mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
libeio bugfix: want_poll should be called if breaking on maxreq
Reported by shansen and hassox http://github.com/ry/node/issues#issue/38 Will send upstream.
This commit is contained in:
3
deps/libeio/eio.c
vendored
3
deps/libeio/eio.c
vendored
@@ -548,6 +548,9 @@ static int etp_poll (void)
|
||||
}
|
||||
}
|
||||
|
||||
if (want_poll_cb)
|
||||
want_poll_cb ();
|
||||
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
20
test/mjsunit/test-many-parallel-eio-jobs.js
Normal file
20
test/mjsunit/test-many-parallel-eio-jobs.js
Normal file
@@ -0,0 +1,20 @@
|
||||
process.mixin(require("./common"));
|
||||
var testTxt = path.join(fixturesDir, "x.txt");
|
||||
var posix = require('posix');
|
||||
|
||||
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);
|
||||
posix.cat(testTxt).addCallback(function(data) {
|
||||
puts("finish");
|
||||
}).addErrback(function (e) {
|
||||
puts("error! " + e);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
}, 100);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user