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

Comparing jsr166/src/test/loops/TimeoutLockLoops.java (file contents):
Revision 1.3 by jsr166, Tue Feb 17 00:40:01 2009 UTC vs.
Revision 1.4 by jsr166, Thu Oct 29 23:09:08 2009 UTC

# Line 23 | Line 23 | public final class TimeoutLockLoops {
23      static final LoopHelpers.SimpleRandom rng = new LoopHelpers.SimpleRandom();
24      static boolean print = false;
25      static final int ITERS = Integer.MAX_VALUE;
26 <    static final long TIMEOUT = 100;
26 >    static final long TIMEOUT = 100;
27  
28      public static void main(String[] args) throws Exception {
29          int maxThreads = 100;
30 <        if (args.length > 0)
30 >        if (args.length > 0)
31              maxThreads = Integer.parseInt(args[0]);
32  
33          print = true;
# Line 79 | Line 79 | public final class TimeoutLockLoops {
79  
80          public final void run() {
81              try {
82 <                barrier.await();
82 >                barrier.await();
83                  int sum = v;
84                  int x = 17;
85                  int n = ITERS;
# Line 104 | Line 104 | public final class TimeoutLockLoops {
104                  barrier.await();
105                  result += sum;
106              }
107 <            catch (Exception ex) {
107 >            catch (Exception ex) {
108                  ex.printStackTrace();
109 <                return;
109 >                return;
110              }
111          }
112      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines