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.12 by dl, Tue Aug 26 13:07:36 2003 UTC vs.
Revision 1.13 by dholmes, Wed Aug 27 01:45:28 2003 UTC

# Line 84 | Line 84 | import java.util.concurrent.locks.*;
84   * model for failed synchronization attempts: If a thread leaves a
85   * barrier point prematurely because of interruption, failure, or
86   * timeout, all other threads, even those that have not yet resumed
87 < * from a previous {@link await}. will also leave abnormally via
87 > * from a previous {@link #await}. will also leave abnormally via
88   * {@link BrokenBarrierException} (or <tt>InterruptedException</tt> if
89   * they too were interrupted at about the same time).
90   *
# Line 268 | Line 268 | public class CyclicBarrier {
268       * interrupted status is cleared.
269       *
270       * <p>If the barrier is {@link #reset} while any thread is waiting, or if
271 <     * the barrier {@link #isBroken is broken} when <tt>await</tt> is invoked
271 >     * the barrier {@link #isBroken is broken} when <tt>await</tt> is invoked,
272 >     * or whilst any thread is waiting,
273       * then {@link BrokenBarrierException} is thrown.
274       *
275       * <p>If any thread is {@link Thread#interrupt interrupted} while waiting,
# Line 281 | Line 282 | public class CyclicBarrier {
282       * current thread runs the action before allowing the other threads to
283       * continue.
284       * If an exception occurs during the barrier action then that exception
285 <     * will be propagated in the current thread.
285 >     * will be propagated in the current thread and the barrier is placed in
286 >     * the broken state.
287       *
288       * @return the arrival index of the current thread, where index
289       *  <tt>{@link #getParties()} - 1</tt> indicates the first to arrive and
# Line 311 | Line 313 | public class CyclicBarrier {
313       * one of the following things happens:
314       * <ul>
315       * <li>The last thread arrives; or
316 <     * <li>The speceified timeout elapses; or
316 >     * <li>The specified timeout elapses; or
317       * <li>Some other thread {@link Thread#interrupt interrupts} the current
318       * thread; or
319       * <li>Some other thread  {@link Thread#interrupt interrupts} one of the
# Line 328 | Line 330 | public class CyclicBarrier {
330       * interrupted status is cleared.
331       *
332       * <p>If the barrier is {@link #reset} while any thread is waiting, or if
333 <     * the barrier {@link #isBroken is broken} when <tt>await</tt> is invoked
333 >     * the barrier {@link #isBroken is broken} when <tt>await</tt> is invoked,
334 >     * or whilst any thread is waiting,
335       * then {@link BrokenBarrierException} is thrown.
336       *
337       * <p>If any thread is {@link Thread#interrupt interrupted} while waiting,
# Line 341 | Line 344 | public class CyclicBarrier {
344       * current thread runs the action before allowing the other threads to
345       * continue.
346       * If an exception occurs during the barrier action then that exception
347 <     * will be propagated in the current thread.
347 >     * will be propagated in the current thread and the barrier is placed in
348 >     * the broken state.
349       *
350       * @param timeout the time to wait for the barrier
351       * @param unit the time unit of the timeout parameter
# Line 368 | Line 372 | public class CyclicBarrier {
372       * Query if this barrier is in a broken state.
373       * @return <tt>true</tt> if one or more parties broke out of this
374       * barrier due to interruption or timeout since construction or
375 <     * the last reset; and <tt>false</tt> otherwise.
375 >     * the last reset, or a barrier action failed due to an exception;
376 >     * and <tt>false</tt> otherwise.
377       */
378      public boolean isBroken() {
379          lock.lock();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines