Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 17 for setFuture (1.26 seconds)

  1. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            // 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.
            if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) {
              // If setFuture fails or set on the future fails then it must be because that future was
              // cancelled
    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)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

            // 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.
            if (!setFutureSetSuccess.get() || !setFutureCompletionSuccess.get()) {
              // If setFuture fails or set on the future fails then it must be because that future was
              // cancelled
    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)
  3. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

              future = setFuture.owner;
              if (future.value() == setFuture) {
                Object valueToSet = getFutureValue(setFuture.future);
                if (casValue(future, setFuture, valueToSet)) {
                  continue outer;
                }
              }
              // otherwise the future we were trying to set is already done.
            } else {
    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)
  4. guava-tests/test/com/google/common/util/concurrent/TrustedInputFutureTest.java

    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Tests for {@link AbstractFuture} that use a {@link TrustedFuture} for {@link
     * AbstractFuture#setFuture} calls.
     */
    @GwtCompatible
    @NullUnmarked
    public class TrustedInputFutureTest extends AbstractAbstractFutureTest {
      @Override
      AbstractFuture<@Nullable Integer> newDelegate() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/TrustedInputFutureTest.java

    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Tests for {@link AbstractFuture} that use a {@link TrustedFuture} for {@link
     * AbstractFuture#setFuture} calls.
     */
    @GwtCompatible
    @NullUnmarked
    public class TrustedInputFutureTest extends AbstractAbstractFutureTest {
      @Override
      AbstractFuture<@Nullable Integer> newDelegate() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  6. guava-tests/test/com/google/common/util/concurrent/UntrustedInputFutureTest.java

    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Tests for {@link AbstractFuture} that use a non-{@link TrustedFuture} for {@link
     * AbstractFuture#setFuture} calls.
     */
    @GwtCompatible
    @NullUnmarked
    public class UntrustedInputFutureTest extends AbstractAbstractFutureTest {
      @Override
      AbstractFuture<@Nullable Integer> newDelegate() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/UntrustedInputFutureTest.java

    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Tests for {@link AbstractFuture} that use a non-{@link TrustedFuture} for {@link
     * AbstractFuture#setFuture} calls.
     */
    @GwtCompatible
    @NullUnmarked
    public class UntrustedInputFutureTest extends AbstractAbstractFutureTest {
      @Override
      AbstractFuture<@Nullable Integer> newDelegate() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 1.3K bytes
    - Click Count (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

        assertCancelled(future, true);
      }
    
      public void testSetFuturePending() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertSetAsynchronously(future);
      }
    
      public void testSetFutureThenCancel() throws Exception {
        assertThat(future.setFuture(delegate)).isTrue();
        assertThat(future.cancel(false /* mayInterruptIfRunning */)).isTrue();
        assertCancelled(future, false);
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 16.3K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

                executor.execute(runnable);
              }
            };
        Future<?> future = newFutureInstance();
        future
            .getClass()
            .getMethod(
                "setFuture",
                future.getClass().getClassLoader().loadClass(ListenableFuture.class.getName()))
            .invoke(future, badFuture);
        CancellationException expected = assertThrows(CancellationException.class, future::get);
    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)
  10. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

                executor.execute(runnable);
              }
            };
        Future<?> future = newFutureInstance();
        future
            .getClass()
            .getMethod(
                "setFuture",
                future.getClass().getClassLoader().loadClass(ListenableFuture.class.getName()))
            .invoke(future, badFuture);
        CancellationException expected = assertThrows(CancellationException.class, future::get);
    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)
Back to Top