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

Comparing jsr166/src/test/loops/TimeoutProducerConsumerLoops.java (file contents):
Revision 1.8 by jsr166, Mon Sep 27 19:15:16 2010 UTC vs.
Revision 1.11 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 51 | Line 51 | public class TimeoutProducerConsumerLoop
51              maxPairs = Integer.parseInt(args[0]);
52  
53          print = true;
54 <        int k = 1;
55 <        for (int i = 1; i <= maxPairs;) {
54 >        for (int k = 1, i = 1; i <= maxPairs;) {
55              System.out.println("Pairs:" + i);
56              oneTest(i, iters);
57              Thread.sleep(100);
# Line 64 | Line 63 | public class TimeoutProducerConsumerLoop
63                  i = k;
64          }
65          pool.shutdown();
66 <   }
66 >    }
67  
68      static void oneTest(int n, int iters) throws Exception {
69          if (print)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines