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

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

# Line 4 | Line 4
4   * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7 + import java.util.*;
8   import java.util.concurrent.*;
8 import java.util.concurrent.locks.*;
9   import java.util.concurrent.atomic.*;
10 < import java.util.*;
10 > import java.util.concurrent.locks.*;
11  
12   public final class NoopSpinLockLoops {
13      static final ExecutorService pool = Executors.newCachedThreadPool();
# Line 24 | Line 24 | public final class NoopSpinLockLoops {
24          new ReentrantLockLoop(1).test();
25          print = true;
26  
27 <        int k = 1;
28 <        for (int i = 1; i <= maxThreads;) {
27 >        for (int k = 1, i = 1; i <= maxThreads;) {
28              System.out.print("Threads: " + i);
29              new ReentrantLockLoop(i).test();
30              Thread.sleep(100);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines