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

Comparing jsr166/src/test/loops/SingleProducerMultipleConsumerLoops.java (file contents):
Revision 1.5 by jsr166, Wed Sep 1 07:47:27 2010 UTC vs.
Revision 1.9 by jsr166, Thu Dec 18 18:13:06 2014 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.concurrent.*;
# Line 36 | Line 36 | public class SingleProducerMultipleConsu
36          warmup();
37          print = true;
38  
39 <        int k = 1;
40 <        for (int i = 1; i <= maxn;) {
39 >        for (int k = 1, i = 1; i <= maxn;) {
40              System.out.println("Consumers:" + i);
41              oneTest(i, ITERS);
42              if (i == k) {
# Line 49 | Line 48 | public class SingleProducerMultipleConsu
48          }
49  
50          pool.shutdown();
51 <   }
51 >    }
52  
53      static void warmup() throws Exception {
54          print = false;
# Line 131 | Line 130 | public class SingleProducerMultipleConsu
130  
131      }
132  
133 <    static abstract class Stage implements Runnable {
133 >    abstract static class Stage implements Runnable {
134          final int iters;
135          final BlockingQueue<Integer> queue;
136          final CyclicBarrier barrier;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines