# | Line 33 | Line 33 | public class TieredPhaserLoops { | |
---|---|---|
33 | } | |
34 | } | |
35 | ||
36 | – | |
36 | static final class PhaserAction implements Runnable { | |
37 | final int id; | |
38 | final int size; | |
# | Line 45 | Line 44 | public class TieredPhaserLoops { | |
44 | phaser.register(); | |
45 | } | |
46 | ||
48 | – | |
47 | public void run() { | |
48 | int n = size; | |
49 | Phaser b = phaser; | |
# | Line 69 | Line 67 | public class TieredPhaserLoops { | |
67 | ||
68 | Runnable[] actions = new Runnable [k]; | |
69 | build(actions, size, 0, k, new Phaser()); | |
70 | < | Future[] futures = new Future[k]; |
70 | > | Future<?>[] futures = new Future<?>[k]; |
71 | for (int i = 0; i < k; ++i) { | |
72 | futures[i] = pool.submit(actions[i]); | |
73 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |