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

Comparing jsr166/src/test/loops/CheckedLockLoops.java (file contents):
Revision 1.8 by jsr166, Tue Mar 15 19:47:05 2011 UTC vs.
Revision 1.10 by jsr166, Wed Dec 31 17:00:58 2014 UTC

# Line 8 | Line 8
8   * @summary basic safety and liveness of ReentrantLocks, and other locks based on them
9   */
10  
11 + import java.util.*;
12   import java.util.concurrent.*;
13   import java.util.concurrent.locks.*;
13 import java.util.*;
14  
15   public final class CheckedLockLoops {
16      static final ExecutorService pool = Executors.newCachedThreadPool();
# Line 31 | Line 31 | public final class CheckedLockLoops {
31  
32      static void runTest(int maxThreads, int iters) throws Exception {
33          print = true;
34 <        int k = 1;
35 <        for (int i = 1; i <= maxThreads;) {
34 >        for (int k = 1, i = 1; i <= maxThreads;) {
35              System.out.println("Threads:" + i);
36              oneTest(i, iters / i);
37              if (i == k) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines