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

Comparing jsr166/src/test/loops/SimpleTimedLockLoops.java (file contents):
Revision 1.3 by dl, Mon Feb 19 00:46:06 2007 UTC vs.
Revision 1.4 by jsr166, Thu Oct 29 23:09:08 2009 UTC

# Line 16 | Line 16 | public final class SimpleTimedLockLoops
16  
17      public static void main(String[] args) throws Exception {
18          int maxThreads = 100;
19 <        if (args.length > 0)
19 >        if (args.length > 0)
20              maxThreads = Integer.parseInt(args[0]);
21  
22          print = true;
# Line 48 | Line 48 | public final class SimpleTimedLockLoops
48          }
49  
50          final void test() throws Exception {
51 <            for (int i = 0; i < nthreads; ++i)
51 >            for (int i = 0; i < nthreads; ++i)
52                  pool.execute(this);
53              barrier.await();
54              barrier.await();
# Line 68 | Line 68 | public final class SimpleTimedLockLoops
68          public final void run() {
69              final ReentrantLock lock = this.lock;
70              try {
71 <                barrier.await();
71 >                barrier.await();
72                  int sum = v + 1;
73                  int x = 0;
74                  int n = iters;
# Line 89 | Line 89 | public final class SimpleTimedLockLoops
89                          ++readBarrier;
90                      for (int l = x & 7; l > 0; --l)
91                          sum += LoopHelpers.compute6(sum);
92 <                }
92 >                }
93                  barrier.await();
94                  result += sum;
95              }
96 <            catch (Exception ie) {
97 <                return;
96 >            catch (Exception ie) {
97 >                return;
98              }
99          }
100      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines