diff options
Diffstat (limited to 'android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java')
-rw-r--r-- | android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java b/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java index 80c777934..c335711c0 100644 --- a/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java +++ b/android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java @@ -25,8 +25,10 @@ import static com.google.common.util.concurrent.Futures.immediateVoidFuture; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static java.util.Objects.requireNonNull; +import com.google.common.annotations.J2ktIncompatible; import java.util.concurrent.Callable; import java.util.concurrent.Executor; +import java.util.concurrent.Future; import java.util.concurrent.atomic.AtomicReference; import javax.annotation.CheckForNull; import org.checkerframework.checker.nullness.qual.Nullable; @@ -54,7 +56,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * (However, cancellation can prevent an <i>unstarted</i> task from running.) Therefore, the * next task will wait for any running callable (or pending {@code Future} returned by an * {@code AsyncCallable}) to complete, without interrupting it (and without calling {@code - * cancel} on the {@code Future}). So beware: <i>Even if you cancel every precededing {@code + * cancel} on the {@code Future}). So beware: <i>Even if you cancel every preceding {@code * Future} returned by this class, the next task may still have to wait.</i>. * <li>Once an {@code AsyncCallable} returns a {@code Future}, this class considers that task to * be "done" as soon as <i>that</i> {@code Future} completes in any way. Notably, a {@code @@ -84,6 +86,7 @@ import org.checkerframework.checker.nullness.qual.Nullable; * @since 26.0 */ @ElementTypesAreNonnullByDefault +@J2ktIncompatible public final class ExecutionSequencer { private ExecutionSequencer() {} @@ -250,7 +253,7 @@ public final class ExecutionSequencer { taskFuture.cancel(false); } }; - // Adding the listener to both futures guarantees that newFuture will aways be set. Adding to + // Adding the listener to both futures guarantees that newFuture will always be set. Adding to // taskFuture guarantees completion if the callable is invoked, and adding to outputFuture // propagates cancellation if the callable has not yet been invoked. outputFuture.addListener(listener, directExecutor()); |