ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ForkJoinPool8Test.java
(Generate patch)

Comparing jsr166/src/test/tck/ForkJoinPool8Test.java (file contents):
Revision 1.16 by jsr166, Mon Sep 16 00:48:00 2013 UTC vs.
Revision 1.17 by jsr166, Mon Sep 16 00:48:58 2013 UTC

# Line 1551 | Line 1551 | public class ForkJoinPool8Test extends J
1551              for (;;) {
1552                  final long startTime = System.nanoTime();
1553                  ForkJoinTask a = new CheckedRecursiveAction() {
1554 <                        protected void realCompute() {
1555 <                            FibAction f = new FibAction(8);
1556 <                            assertSame(f, f.fork());
1557 <                            ForkJoinTask.helpQuiesce();
1558 <                            while (!f.isDone()) {
1559 <                                if (millisElapsedSince(startTime) > LONG_DELAY_MS)
1560 <                                    threadFail("timed out");
1561 <                                assertFalse(p.getAsyncMode());
1562 <                                assertFalse(p.isShutdown());
1563 <                                assertFalse(p.isTerminating());
1564 <                                assertFalse(p.isTerminated());
1565 <                                Thread.yield();
1566 <                            }
1567 <                            assertEquals(0, ForkJoinTask.getQueuedTaskCount());
1568 <                            try {
1569 <                                assertEquals(21, f.result);
1570 <                            } catch (Throwable fail) { System.out.println("fail " + fail.getMessage()); }
1554 >                    protected void realCompute() {
1555 >                        FibAction f = new FibAction(8);
1556 >                        assertSame(f, f.fork());
1557 >                        ForkJoinTask.helpQuiesce();
1558 >                        while (!f.isDone()) {
1559 >                            if (millisElapsedSince(startTime) > LONG_DELAY_MS)
1560 >                                threadFail("timed out");
1561 >                            assertFalse(p.getAsyncMode());
1562 >                            assertFalse(p.isShutdown());
1563 >                            assertFalse(p.isTerminating());
1564 >                            assertFalse(p.isTerminated());
1565 >                            Thread.yield();
1566                          }
1567 <                    };
1567 >                        assertEquals(0, ForkJoinTask.getQueuedTaskCount());
1568 >                        try {
1569 >                            assertEquals(21, f.result);
1570 >                        } catch (Throwable fail) { System.out.println("fail " + fail.getMessage()); }
1571 >                    }};
1572                  p.execute(a);
1573                  if (a.isDone() || p.isQuiescent())
1574                      continue; // Already done so cannot test; retry

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines