--- jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2011/03/15 19:47:06 1.5 +++ jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2015/01/15 18:34:19 1.8 @@ -8,10 +8,9 @@ import java.util.*; import java.util.concurrent.*; //import jsr166y.*; -/* +/** * Based loosely on Java Grande Forum barrierBench */ - public class SpinningTieredPhaserLoops { static final int NCPUS = Runtime.getRuntime().availableProcessors(); static final ExecutorService pool = Executors.newCachedThreadPool(); @@ -45,7 +44,6 @@ public class SpinningTieredPhaserLoops { phaser.register(); } - public void run() { int n = size; Phaser b = phaser; @@ -72,9 +70,9 @@ public class SpinningTieredPhaserLoops { for (int size = FIRST_SIZE; size <= LAST_SIZE; size *= 10) { long startTime = System.nanoTime(); - Runnable[] actions = new Runnable [k]; + Runnable[] actions = new Runnable[k]; build(actions, size, 0, k, new Phaser()); - Future[] futures = new Future[k]; + Future[] futures = new Future[k]; for (int i = 0; i < k; ++i) { futures[i] = pool.submit(actions[i]); }