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

Comparing jsr166/src/test/loops/ConcurrentQueueLoops.java (file contents):
Revision 1.11 by jsr166, Wed Sep 1 07:47:27 2010 UTC vs.
Revision 1.15 by jsr166, Thu Dec 18 18:13:06 2014 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import java.util.*;
# Line 50 | Line 50 | public class ConcurrentQueueLoops {
50          Thread.sleep(100);
51          print = true;
52  
53 <        int k = 1;
54 <        for (int i = 1; i <= maxStages;) {
53 >        for (int k = 1, i = 1; i <= maxStages;) {
54              oneRun(klass, i);
55              if (i == k) {
56                  k = i << 1;
# Line 61 | Line 60 | public class ConcurrentQueueLoops {
60                  i = k;
61          }
62          pool.shutdown();
63 <   }
63 >    }
64  
65      static final class Stage implements Callable<Integer> {
66          final Queue<Integer> queue;
# Line 76 | Line 75 | public class ConcurrentQueueLoops {
75          static int compute(int l) {
76              if (l == 0)
77                  return (int) System.nanoTime();
78 <            int nn =  (l >>> 7) & workMask;
78 >            int nn = (l >>> 7) & workMask;
79              while (nn-- > 0)
80                  l = LoopHelpers.compute6(l);
81              return l;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines