--- jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2009/11/03 12:37:26 1.4 +++ jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2014/12/18 18:43:22 1.7 @@ -1,17 +1,16 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ 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(); @@ -72,9 +71,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]); }