--- jsr166/src/jsr166e/ForkJoinPool.java 2012/12/13 20:47:34 1.28 +++ jsr166/src/jsr166e/ForkJoinPool.java 2012/12/15 20:21:25 1.30 @@ -1851,9 +1851,9 @@ public class ForkJoinPool extends Abstra if ((u = (int)(ctl >>> 32)) < 0 && (u >> UAC_SHIFT) < 0 && (ws = workQueues) != null && (m = ws.length - 1) >= 0 && (q = ws[h & m]) != null) { - for (int n = 2;;) { // limit to at most 2 signals + for (int n = (m >>> 2) | 1;;) { // limit signals int idleCount = (caller.eventCount < 0) ? 0 : -1; - if (((s = idleCount - q.base + q.top) <= n && + if (((s = idleCount - q.base + q.top) <= n && (n = s) <= 0) || (u = (int)((c = ctl) >>> 32)) >= 0 || (e = (int)c) <= 0 || m < (i = e & SMASK) ||