17 |
|
* {@link java.util.concurrent.CountDownLatch CountDownLatch} |
18 |
|
* but supporting more flexible usage. |
19 |
|
* |
20 |
< |
* <p> <b>Registration.</b> Unlike the case for other barriers, the |
20 |
> |
* <p><b>Registration.</b> Unlike the case for other barriers, the |
21 |
|
* number of parties <em>registered</em> to synchronize on a phaser |
22 |
|
* may vary over time. Tasks may be registered at any time (using |
23 |
|
* methods {@link #register}, {@link #bulkRegister}, or forms of |
30 |
|
* (However, you can introduce such bookkeeping by subclassing this |
31 |
|
* class.) |
32 |
|
* |
33 |
< |
* <p> <b>Synchronization.</b> Like a {@code CyclicBarrier}, a {@code |
33 |
> |
* <p><b>Synchronization.</b> Like a {@code CyclicBarrier}, a {@code |
34 |
|
* Phaser} may be repeatedly awaited. Method {@link |
35 |
|
* #arriveAndAwaitAdvance} has effect analogous to {@link |
36 |
|
* java.util.concurrent.CyclicBarrier#await CyclicBarrier.await}. Each |
74 |
|
* |
75 |
|
* </ul> |
76 |
|
* |
77 |
< |
* <p> <b>Termination.</b> A phaser may enter a <em>termination</em> |
77 |
> |
* <p><b>Termination.</b> A phaser may enter a <em>termination</em> |
78 |
|
* state, that may be checked using method {@link #isTerminated}. Upon |
79 |
|
* termination, all synchronization methods immediately return without |
80 |
|
* waiting for advance, as indicated by a negative return value. |
89 |
|
* also available to abruptly release waiting threads and allow them |
90 |
|
* to terminate. |
91 |
|
* |
92 |
< |
* <p> <b>Tiering.</b> Phasers may be <em>tiered</em> (i.e., |
92 |
> |
* <p><b>Tiering.</b> Phasers may be <em>tiered</em> (i.e., |
93 |
|
* constructed in tree structures) to reduce contention. Phasers with |
94 |
|
* large numbers of parties that would otherwise experience heavy |
95 |
|
* synchronization contention costs may instead be set up so that |