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

Comparing jsr166/src/test/loops/LockLoops.java (file contents):
Revision 1.8 by jsr166, Mon Dec 5 04:08:46 2011 UTC vs.
Revision 1.11 by jsr166, Mon Aug 10 03:13:33 2015 UTC

# Line 7 | Line 7
7   * A simple test program. Feel free to play.
8   */
9  
10 + import java.util.*;
11   import java.util.concurrent.*;
12   import java.util.concurrent.locks.*;
12 import java.util.*;
13  
14   public final class LockLoops {
15      static final ExecutorService pool = Executors.newCachedThreadPool();
# Line 93 | Line 93 | public final class LockLoops {
93                  System.out.print("ReentrantReadWriteLock");
94              new ReentrantReadWriteLockLoop().test(v, nthreads, iters);
95              Thread.sleep(10);
96
96          }
97  
98          if (doSemaphore) {
# Line 106 | Line 105 | public final class LockLoops {
105                  System.out.print("FairSemaphore         ");
106              new FairSemaphoreLoop().test(v, nthreads, iters);
107              Thread.sleep(10);
109
108          }
109  
110          if (doFair) {
# Line 126 | Line 124 | public final class LockLoops {
124                  new FairReentrantReadWriteLockLoop().test(v, nthreads, iters);
125                  Thread.sleep(10);
126              }
129
127          }
131
128      }
129  
130      abstract static class LockLoop implements Runnable {
# Line 378 | Line 374 | public final class LockLoops {
374              return sum;
375          }
376      }
381
382
377   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines