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.37 by jsr166, Thu Apr 20 06:52:38 2006 UTC vs.
Revision 1.38 by jsr166, Sun May 18 23:47:56 2008 UTC

# Line 152 | Line 152 | public class CyclicBarrier {
152       */
153      private void breakBarrier() {
154          generation.broken = true;
155 <        count = parties;
155 >        count = parties;
156          trip.signalAll();
157      }
158  
# Line 179 | Line 179 | public class CyclicBarrier {
179             if (index == 0) {  // tripped
180                 boolean ranAction = false;
181                 try {
182 <                   final Runnable command = barrierCommand;
182 >                   final Runnable command = barrierCommand;
183                     if (command != null)
184                         command.run();
185                     ranAction = true;
# Line 201 | Line 201 | public class CyclicBarrier {
201                  } catch (InterruptedException ie) {
202                      if (g == generation && ! g.broken) {
203                          breakBarrier();
204 <                        throw ie;
205 <                    } else {
206 <                        // We're about to finish waiting even if we had not
207 <                        // been interrupted, so this interrupt is deemed to
208 <                        // "belong" to subsequent execution.
209 <                        Thread.currentThread().interrupt();
210 <                    }
204 >                        throw ie;
205 >                    } else {
206 >                        // We're about to finish waiting even if we had not
207 >                        // been interrupted, so this interrupt is deemed to
208 >                        // "belong" to subsequent execution.
209 >                        Thread.currentThread().interrupt();
210 >                    }
211                  }
212  
213                  if (g.broken)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines