diff options
Diffstat (limited to 'luni/src/main/java/java/util/concurrent/CountDownLatch.java')
-rw-r--r-- | luni/src/main/java/java/util/concurrent/CountDownLatch.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/luni/src/main/java/java/util/concurrent/CountDownLatch.java b/luni/src/main/java/java/util/concurrent/CountDownLatch.java index 1888279..e90badf 100644 --- a/luni/src/main/java/java/util/concurrent/CountDownLatch.java +++ b/luni/src/main/java/java/util/concurrent/CountDownLatch.java @@ -1,12 +1,11 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ package java.util.concurrent; import java.util.concurrent.locks.*; -import java.util.concurrent.atomic.*; /** * A synchronization aid that allows one or more threads to wait until @@ -44,7 +43,7 @@ import java.util.concurrent.atomic.*; * until all workers have completed. * </ul> * - * <pre> + * <pre> {@code * class Driver { // ... * void main() throws InterruptedException { * CountDownLatch startSignal = new CountDownLatch(1); @@ -76,9 +75,7 @@ import java.util.concurrent.atomic.*; * } * * void doWork() { ... } - * } - * - * </pre> + * }}</pre> * * <p>Another typical usage would be to divide a problem into N parts, * describe each part with a Runnable that executes that portion and @@ -87,7 +84,7 @@ import java.util.concurrent.atomic.*; * will be able to pass through await. (When threads must repeatedly * count down in this way, instead use a {@link CyclicBarrier}.) * - * <pre> + * <pre> {@code * class Driver2 { // ... * void main() throws InterruptedException { * CountDownLatch doneSignal = new CountDownLatch(N); @@ -115,9 +112,7 @@ import java.util.concurrent.atomic.*; * } * * void doWork() { ... } - * } - * - * </pre> + * }}</pre> * * <p>Memory consistency effects: Until the count reaches * zero, actions in a thread prior to calling |