44 |
|
* until all workers have completed. |
45 |
|
* </ul> |
46 |
|
* |
47 |
< |
* <pre> {@code |
47 |
> |
* <pre> {@code |
48 |
|
* class Driver { // ... |
49 |
|
* void main() throws InterruptedException { |
50 |
|
* CountDownLatch startSignal = new CountDownLatch(1); |
85 |
|
* will be able to pass through await. (When threads must repeatedly |
86 |
|
* count down in this way, instead use a {@link CyclicBarrier}.) |
87 |
|
* |
88 |
< |
* <pre> {@code |
88 |
> |
* <pre> {@code |
89 |
|
* class Driver2 { // ... |
90 |
|
* void main() throws InterruptedException { |
91 |
|
* CountDownLatch doneSignal = new CountDownLatch(N); |