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

Comparing jsr166/src/test/loops/RLIBar.java (file contents):
Revision 1.5 by jsr166, Wed Sep 1 07:47:27 2010 UTC vs.
Revision 1.9 by jsr166, Thu Jan 15 18:34:19 2015 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   // Adapted from code that was in turn
7   // Derived from SocketPerformanceTest.java - BugID: 4763450
# Line 29 | Line 29 | public class RLIBar {
29      static int HoldPop;
30      static int HoldLimit;
31  
32 <    static private boolean HoldCheck() {
32 >    private static boolean HoldCheck() {
33          try {
34              HoldQ.lock();
35              try {
# Line 137 | Line 137 | public class RLIBar {
137                  e.printStackTrace();
138              }
139          }
140
141
140      }
141  
142      public static void main(String[] args) throws Exception {
# Line 221 | Line 219 | public class RLIBar {
219              if (false && j == 2) {
220                  System.out.print("Hold activated ...");
221                  HoldQ.lock();
222 <                try  {
222 >                try {
223                      Hold = true;
224                      while (Hold) HoldQCond.await();
225                  }
# Line 230 | Line 228 | public class RLIBar {
228                  }
229              }
230  
233
234
231              // there's no synchronization here, so the total i get is
232              // approximate, but that's OK since any i miss for this
233              // sample will get credited to the next sample, and on average

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines