Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit 04dd2d5

Browse files
committed
libeio bugfix: want_poll should be called if breaking on maxreq
Reported by shansen and hassox https://github.com./ry/node/issues#issue/38 Will send upstream.
1 parent 933a37c commit 04dd2d5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

deps/libeio/eio.c

+3
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,9 @@ static int etp_poll (void)
548548
}
549549
}
550550

551+
if (want_poll_cb)
552+
want_poll_cb ();
553+
551554
errno = EAGAIN;
552555
return -1;
553556
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
process.mixin(require("./common"));
2+
var testTxt = path.join(fixturesDir, "x.txt");
3+
var posix = require('posix');
4+
5+
setTimeout(function () {
6+
// put this in a timeout, just so it doesn't get bunched up with the
7+
// require() calls..
8+
N = 30;
9+
for (var i=0; i < N; i++) {
10+
puts("start " + i);
11+
posix.cat(testTxt).addCallback(function(data) {
12+
puts("finish");
13+
}).addErrback(function (e) {
14+
puts("error! " + e);
15+
process.exit(1);
16+
});
17+
}
18+
}, 100);
19+
20+

0 commit comments

Comments
 (0)