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

Comparing jsr166/src/test/loops/LeftSpineFib.java (file contents):
Revision 1.6 by jsr166, Thu Jan 15 18:34:19 2015 UTC vs.
Revision 1.7 by dl, Sat Sep 12 19:06:29 2015 UTC

# Line 31 | Line 31 | public final class LeftSpineFib extends
31          }
32  
33          for (int reps = 0; reps < 2; ++reps) {
34 <            ForkJoinPool g = (procs == 0) ? new ForkJoinPool() :
34 >            ForkJoinPool g = (procs == 0) ? ForkJoinPool.commonPool() :
35                  new ForkJoinPool(procs);
36            //            g.setMaintainsParallelism(false);
36              lastStealCount = g.getStealCount();
37              for (int i = 0; i < 20; ++i) {
38                  test(g, num);
39 <                Thread.sleep(50);
39 >                Thread.sleep(100);
40              }
41              System.out.println(g);
42 <            g.shutdown();
43 <            if (!g.awaitTermination(8, TimeUnit.SECONDS)) {
45 <                System.out.println(g);
46 <                throw new Error();
47 <            }
48 <            g = null;
49 <            //            System.gc();
42 >            if (g != ForkJoinPool.commonPool())
43 >                g.shutdown();
44              Thread.sleep(500);
45          }
46      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines