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.24 by dl, Mon Feb 9 00:23:55 2004 UTC vs.
Revision 1.25 by dl, Mon Feb 9 13:28:47 2004 UTC

# Line 121 | Line 121 | public class CyclicBarrier {
121      private int count;
122  
123      /**
124 <     * Update state on barrier trip and wake up everyone.
124 >     * Updates state on barrier trip and wake up everyone.
125       */  
126      private void nextGeneration() {
127          count = parties;
# Line 130 | Line 130 | public class CyclicBarrier {
130      }
131  
132      /**
133 <     * Set barrier as broken and wake up everyone
133 >     * Sets barrier as broken and wake up everyone
134       */
135      private void breakBarrier() {
136          broken = true;
# Line 201 | Line 201 | public class CyclicBarrier {
201      }
202  
203      /**
204 <     * Create a new <tt>CyclicBarrier</tt> that will trip when the
204 >     * Creates a new <tt>CyclicBarrier</tt> that will trip when the
205       * given number of parties (threads) are waiting upon it, and which
206       * will execute the given barrier action when the barrier is tripped,
207       * performed by the last thread entering the barrier.
# Line 221 | Line 221 | public class CyclicBarrier {
221      }
222  
223      /**
224 <     * Create a new <tt>CyclicBarrier</tt> that will trip when the
224 >     * Creates a new <tt>CyclicBarrier</tt> that will trip when the
225       * given number of parties (threads) are waiting upon it, and
226       * does not perform a predefined action upon each barrier.
227       *
# Line 235 | Line 235 | public class CyclicBarrier {
235      }
236  
237      /**
238 <     * Return the number of parties required to trip this barrier.
238 >     * Returns the number of parties required to trip this barrier.
239       * @return the number of parties required to trip this barrier.
240       **/
241      public int getParties() {
# Line 243 | Line 243 | public class CyclicBarrier {
243      }
244  
245      /**
246 <     * Wait until all {@link #getParties parties} have invoked <tt>await</tt>
246 >     * Waits until all {@link #getParties parties} have invoked <tt>await</tt>
247       * on this barrier.
248       *
249       * <p>If the current thread is not the last to arrive then it is
# Line 304 | Line 304 | public class CyclicBarrier {
304      }
305  
306      /**
307 <     * Wait until all {@link #getParties parties} have invoked <tt>await</tt>
307 >     * Waits until all {@link #getParties parties} have invoked <tt>await</tt>
308       * on this barrier.
309       *
310       * <p>If the current thread is not the last to arrive then it is
# Line 368 | Line 368 | public class CyclicBarrier {
368      }
369  
370      /**
371 <     * Query if this barrier is in a broken state.
371 >     * Queries if this barrier is in a broken state.
372       * @return <tt>true</tt> if one or more parties broke out of this
373       * barrier due to interruption or timeout since construction or
374       * the last reset, or a barrier action failed due to an exception;
# Line 385 | Line 385 | public class CyclicBarrier {
385      }
386  
387      /**
388 <     * Reset the barrier to its initial state.  If any parties are
388 >     * Resets the barrier to its initial state.  If any parties are
389       * currently waiting at the barrier, they will return with a
390       * {@link BrokenBarrierException}. Note that resets <em>after</em>
391       * a breakage has occurred for other reasons can be complicated to
# Line 412 | Line 412 | public class CyclicBarrier {
412      }
413  
414      /**
415 <     * Return the number of parties currently waiting at the barrier.
415 >     * Returns the number of parties currently waiting at the barrier.
416       * This method is primarily useful for debugging and assertions.
417       *
418       * @return the number of parties currently blocked in {@link #await}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines