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

Comparing jsr166/src/test/loops/COWALAddIfAbsentStringLoops.java (file contents):
Revision 1.1 by jsr166, Sat Apr 6 20:10:54 2013 UTC vs.
Revision 1.3 by jsr166, Wed Jun 12 18:14:41 2013 UTC

# Line 24 | Line 24 | public class COWALAddIfAbsentStringLoops
24       */
25      static final int CACHE_HIT_FACTOR = Integer.getInteger("cache.hit.factor", 1);
26  
27 <    static final int MAX_STRIPES = Integer.getInteger("max.stripes", 3);
27 >    static final int MAX_STRIPES = Integer.getInteger("max.stripes", 4);
28  
29      static final int REPS = Integer.getInteger("reps", 3);
30  
# Line 41 | Line 41 | public class COWALAddIfAbsentStringLoops
41          result.set(0);
42          Thread[] ts = new Thread[CACHE_HIT_FACTOR*n];
43          Phaser started = new Phaser(ts.length + 1);
44 <        CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>();
44 >        CopyOnWriteArrayList<String> list =
45 >            new CopyOnWriteArrayList<String>();
46          for (int i = 0; i < ts.length; ++i)
47              (ts[i] = new Thread(new Task(i%n, n, list, started))).start();
48          long p = started.arriveAndAwaitAdvance();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines