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

Comparing jsr166/src/test/loops/MultipleProducersSingleConsumerLoops.java (file contents):
Revision 1.7 by jsr166, Mon Sep 27 19:15:15 2010 UTC vs.
Revision 1.11 by jsr166, Mon Aug 10 03:13:33 2015 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import java.util.*;
# Line 54 | Line 54 | public class MultipleProducersSingleCons
54  
55          warmup();
56          print = true;
57 <        int k = 1;
58 <        for (int i = 1; i <= maxn;) {
57 >        for (int k = 1, i = 1; i <= maxn;) {
58              System.out.println("Producers:" + i);
59              oneTest(i, ITERS);
60              if (i == k) {
# Line 121 | Line 120 | public class MultipleProducersSingleCons
120              System.out.print("SynchronousQueue        ");
121          oneRun(new SynchronousQueue<Integer>(), n, iters);
122  
124
123          Thread.sleep(100); // System.gc();
124          if (print)
125              System.out.print("SynchronousQueue(fair)  ");
# Line 146 | Line 144 | public class MultipleProducersSingleCons
144          if (print)
145              System.out.print("ArrayBlockingQueue(fair)");
146          oneRun(new ArrayBlockingQueue<Integer>(POOL_SIZE, true), n, fairIters);
149
150
147      }
148  
149      abstract static class Stage implements Runnable {
# Line 230 | Line 226 | public class MultipleProducersSingleCons
226  
227      }
228  
233
229      static void oneRun(BlockingQueue<Integer> q, int n, int iters) throws Exception {
230  
231          LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines