ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/CyclicBarrier.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/CyclicBarrier.java (file contents):
Revision 1.39 by jsr166, Tue Mar 15 19:47:03 2011 UTC vs.
Revision 1.40 by jsr166, Thu Apr 14 23:05:50 2011 UTC

# Line 175 | Line 175 | public class CyclicBarrier {
175                  throw new InterruptedException();
176              }
177  
178 <           int index = --count;
179 <           if (index == 0) {  // tripped
180 <               boolean ranAction = false;
181 <               try {
182 <                   final Runnable command = barrierCommand;
183 <                   if (command != null)
184 <                       command.run();
185 <                   ranAction = true;
186 <                   nextGeneration();
187 <                   return 0;
188 <               } finally {
189 <                   if (!ranAction)
190 <                       breakBarrier();
191 <               }
192 <           }
178 >            int index = --count;
179 >            if (index == 0) {  // tripped
180 >                boolean ranAction = false;
181 >                try {
182 >                    final Runnable command = barrierCommand;
183 >                    if (command != null)
184 >                        command.run();
185 >                    ranAction = true;
186 >                    nextGeneration();
187 >                    return 0;
188 >                } finally {
189 >                    if (!ranAction)
190 >                        breakBarrier();
191 >                }
192 >            }
193  
194              // loop until tripped, broken, interrupted, or timed out
195              for (;;) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines