Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 14 for Cancellation (0.28 seconds)

  1. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

        // unmeasurable (comparing done AbstractFutures with immediateFuture)
        if (obj instanceof Cancellation) {
          Cancellation cancellation = (Cancellation) obj;
          Throwable cause = cancellation.cause;
          throw cancellationExceptionWithCause("Task was cancelled.", cause);
        } else if (obj instanceof Failure) {
          Failure failure = (Failure) obj;
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 14:39:00 GMT 2026
    - 43.6K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

    import java.util.concurrent.Future;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Tests for {@link AbstractFuture} with the cancellation cause system property set */
    @AndroidIncompatible // custom classloading
    
    @NullUnmarked
    @GwtIncompatible
    @J2ktIncompatible
    public class AbstractFutureCancellationCauseTest extends TestCase {
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 6.3K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

    import java.util.concurrent.Future;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Tests for {@link AbstractFuture} with the cancellation cause system property set */
    @AndroidIncompatible // custom classloading
    
    @NullUnmarked
    @GwtIncompatible
    @J2ktIncompatible
    public class AbstractFutureCancellationCauseTest extends TestCase {
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 6.3K bytes
    - Click Count (0)
  4. android/guava/src/com/google/common/util/concurrent/Futures.java

     * Futures#transform(ListenableFuture, Function, Executor) Futures.transform}, but you will often
     * find it easier to use a framework. Frameworks automate the process, often adding features like
     * monitoring, debugging, and cancellation. Examples of frameworks include:
     *
     * <ul>
     *   <li><a href="https://dagger.dev/producers.html">Dagger Producers</a>
     * </ul>
     *
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 19:26:39 GMT 2026
    - 64.2K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

            return getValue();
          }
    
          /**
           * Implementation of the actual value retrieval. Will return the value on success, an
           * exception on failure, a cancellation on cancellation, or an illegal state if the
           * synchronizer is in an invalid state.
           */
          private V getValue() throws CancellationException, ExecutionException {
            int state = getState();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureBenchmarks.java

            return getValue();
          }
    
          /**
           * Implementation of the actual value retrieval. Will return the value on success, an
           * exception on failure, a cancellation on cancellation, or an illegal state if the
           * synchronizer is in an invalid state.
           */
          private V getValue() throws CancellationException, ExecutionException {
            int state = getState();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Mar 07 02:20:33 GMT 2026
    - 13.8K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

            .that(step3.statusFuture().isCancelled())
            .isTrue();
        // Its closeable is still open.
        assertStillOpen(closeable3);
    
        // Step 4 is not cancelled, because it caught the cancellation.
        assertWithMessage("step4.statusFuture().isCancelled()")
            .that(step4.statusFuture().isCancelled())
            .isFalse();
        // Its closeable isn't closed yet.
        assertStillOpen(closeable4);
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  8. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

            .that(step3.statusFuture().isCancelled())
            .isTrue();
        // Its closeable is still open.
        assertStillOpen(closeable3);
    
        // Step 4 is not cancelled, because it caught the cancellation.
        assertWithMessage("step4.statusFuture().isCancelled()")
            .that(step4.statusFuture().isCancelled())
            .isFalse();
        // Its closeable isn't closed yet.
        assertStillOpen(closeable4);
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 63K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

          Object result = Iterables.getOnlyElement(finalResults);
          if (result == CancellationException.class) {
            assertTrue(future.isCancelled());
            assertTrue(cancellationSuccess.get());
            // cancellation can interleave in 3 ways
            // 1. prior to setFuture
            // 2. after setFuture before set() on the future assigned
            // 3. after setFuture and set() are called but before the listener completes.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 45.2K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

                 * This is similar to the above test, but this time we're making sure that we recognize
                 * that the output Future is done early not because of an exception but because of a
                 * cancellation.
                 */
                secondFuture.setException(subsequentFailure),
            directExecutor());
        firstFuture.cancel(false);
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 134K bytes
    - Click Count (0)
Back to Top