99 |
|
try { |
100 |
|
assertNull(a.get()); |
101 |
|
assertNull(a.get(randomTimeout(), randomTimeUnit())); |
102 |
< |
} catch (Exception fail) { threadUnexpectedException(fail); } |
102 |
> |
} catch (Throwable fail) { threadUnexpectedException(fail); } |
103 |
|
} |
104 |
|
|
105 |
|
void checkCancelled(RecursiveAction a) { |
325 |
|
* succeeds in the presence of interrupts |
326 |
|
*/ |
327 |
|
public void testJoinIgnoresInterruptsOutsideForkJoinPool() { |
328 |
< |
final SynchronousQueue<FibAction[]> sq = |
329 |
< |
new SynchronousQueue<FibAction[]>(); |
328 |
> |
final SynchronousQueue<FibAction[]> sq = new SynchronousQueue<>(); |
329 |
|
RecursiveAction a = new CheckedRecursiveAction() { |
330 |
|
protected void realCompute() throws InterruptedException { |
331 |
|
FibAction[] fibActions = new FibAction[6]; |
337 |
|
fibActions[4].cancel(true); |
338 |
|
fibActions[5].completeExceptionally(new FJException()); |
339 |
|
|
340 |
< |
for (int i = 0; i < fibActions.length; i++) |
341 |
< |
fibActions[i].fork(); |
340 |
> |
for (FibAction fibAction : fibActions) |
341 |
> |
fibAction.fork(); |
342 |
|
|
343 |
|
sq.put(fibActions); |
344 |
|
|