12 |
|
import java.util.concurrent.locks.LockSupport; |
13 |
|
|
14 |
|
/** |
15 |
< |
* A reusable synchronization barrier, similar in functionality to a |
15 |
> |
* A reusable synchronization barrier, similar in functionality to |
16 |
|
* {@link java.util.concurrent.CyclicBarrier CyclicBarrier} and |
17 |
|
* {@link java.util.concurrent.CountDownLatch CountDownLatch} |
18 |
|
* but supporting more flexible usage. |
27 |
|
* #arriveAndDeregister}). As is the case with most basic |
28 |
|
* synchronization constructs, registration and deregistration affect |
29 |
|
* only internal counts; they do not establish any further internal |
30 |
< |
* bookkeeping, so tasks cannot query whether they are |
31 |
< |
* registered. (However, you can introduce such bookkeeping by |
32 |
< |
* subclassing this class.) |
30 |
> |
* bookkeeping, so tasks cannot query whether they are registered. |
31 |
> |
* (However, you can introduce such bookkeeping by subclassing this |
32 |
> |
* class.) |
33 |
|
* |
34 |
|
* <li> Each generation has an associated phase number. The phase |
35 |
|
* number starts at zero, amd advances when all parties arrive at the |