152 |
|
*/ |
153 |
|
private void breakBarrier() { |
154 |
|
generation.broken = true; |
155 |
< |
count = parties; |
155 |
> |
count = parties; |
156 |
|
trip.signalAll(); |
157 |
|
} |
158 |
|
|
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; |
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) |