Browse Source

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.
v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
04dd2d51be
  1. 3
      deps/libeio/eio.c
  2. 20
      test/mjsunit/test-many-parallel-eio-jobs.js

3
deps/libeio/eio.c

@ -548,6 +548,9 @@ static int etp_poll (void)
} }
} }
if (want_poll_cb)
want_poll_cb ();
errno = EAGAIN; errno = EAGAIN;
return -1; return -1;
} }

20
test/mjsunit/test-many-parallel-eio-jobs.js

@ -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);
Loading…
Cancel
Save