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

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

# Line 27 | Line 27 | public class ExchangeLoops {
27                  trialMillis = Integer.parseInt(args[argc]);
28              else if (option.equals("-r"))
29                  nReps = Integer.parseInt(args[argc]);
30 <            else
30 >            else
31                  maxThreads = Integer.parseInt(option);
32              argc++;
33          }
# Line 96 | Line 96 | public class ExchangeLoops {
96              threads[i].start();
97          }
98          Thread.sleep(trialMillis);
99 <        for (int i = 0; i < nThreads; ++i)
99 >        for (int i = 0; i < nThreads; ++i)
100              threads[i].interrupt();
101          long elapsed = System.nanoTime() - startTime;
102 <        for (int i = 0; i < nThreads; ++i)
102 >        for (int i = 0; i < nThreads; ++i)
103              threads[i].join();
104          int iters = 1;
105          //        System.out.println();
# Line 116 | Line 116 | public class ExchangeLoops {
116          System.out.println();
117          //        x.printStats();
118      }
119 <      
119 >
120      static final class Runner implements Runnable {
121          final Exchanger exchanger;
122          final Object mine = new Integer(2688);
# Line 141 | Line 141 | public class ExchangeLoops {
141          }
142      }
143   }
144        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines