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

Comparing jsr166/src/test/loops/RLJBar.java (file contents):
Revision 1.3 by jsr166, Thu Oct 29 23:09:08 2009 UTC vs.
Revision 1.4 by jsr166, Wed Sep 1 07:20:36 2010 UTC

# Line 25 | Line 25 | class Producer extends Thread
25        final ReentrantLock bar = RLJBar.bar;
26        final ReentrantLock end = RLJBar.End;
27        final Condition endCondition = RLJBar.EndCondition;
28 <      if (RLJBar.OneKey) key = new Integer(0) ;         // per-thread v. per iteration
28 >      if (RLJBar.OneKey) key = new Integer(0) ;         // per-thread v. per iteration
29  
30        // The barrier has a number of interesting effects:
31 <      // 1.     It enforces full LWP provisioning on T1.
32 <      //                (nearly all workers park concurrently).
33 <      // 2.     It gives the C2 compiler thread(s) a chance to run.
34 <      //                By transiently quiescing the workings the C2 threads
35 <      //                might avoid starvation.
31 >      // 1.     It enforces full LWP provisioning on T1.
32 >      //                (nearly all workers park concurrently).
33 >      // 2.     It gives the C2 compiler thread(s) a chance to run.
34 >      //                By transiently quiescing the workings the C2 threads
35 >      //                might avoid starvation.
36        //
37  
38        try {
# Line 88 | Line 88 | class Producer extends Thread
88   }
89  
90  
91 < public class RLJBar                             // ProdConsTest
91 > public class RLJBar                             // ProdConsTest
92   {
93  
94      public static final int ITERS = 10;
95 <  public static boolean OneKey = false ;                        // alloc once or once per iteration
95 >  public static boolean OneKey = false ;                        // alloc once or once per iteration
96  
97    public static boolean UseBar = false ;
98    public static int nThreads = 100 ;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines