# | Line 117 | Line 117 | public class ConcurrentQueueLoops { | |
---|---|---|
117 | } | |
118 | ||
119 | static void oneRun(Class<?> klass, int n) throws Exception { | |
120 | < | Queue<Integer> q = (Queue<Integer>) klass.newInstance(); |
120 | > | Queue<Integer> q = |
121 | > | (Queue<Integer>) klass.getConstructor().newInstance(); |
122 | LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); | |
123 | CyclicBarrier barrier = new CyclicBarrier(n + 1, timer); | |
124 | ArrayList<Future<Integer>> results = new ArrayList<Future<Integer>>(n); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |