Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for SettableFuture (0.21 sec)

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

     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public final class SettableFuture<V extends @Nullable Object>
        extends AbstractFuture.TrustedFuture<V> {
      /**
       * Creates a new {@code SettableFuture} that can be completed or cancelled by a later method call.
       */
      public static <V extends @Nullable Object> SettableFuture<V> create() {
        return new SettableFuture<>();
      }
    
      @CanIgnoreReturnValue
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 17:18:04 GMT 2021
    - 2.4K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

              }
            };
    
        final SettableFuture<String> delayedSuccess = SettableFuture.create();
        final SettableFuture<String> delayedFailed = SettableFuture.create();
        final SettableFuture<String> delayedCancelled = SettableFuture.create();
    
        final SettableFuture<String> delegateForDelayedRuntimeException = SettableFuture.create();
        final ListenableFuture<String> delayedRuntimeException =
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        WeakReference<Object> ref = new WeakReference<>(toBeGCed);
        final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create();
        ListenableFuture<?> ignored =
            serializer.submitAsync(
                new AsyncCallable<@Nullable Void>() {
                  @Override
                  public ListenableFuture<@Nullable Void> call() {
                    return settableFuture;
                  }
                },
                directExecutor());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        WeakReference<Object> ref = new WeakReference<>(toBeGCed);
        final SettableFuture<@Nullable Void> settableFuture = SettableFuture.create();
        ListenableFuture<?> ignored =
            serializer.submitAsync(
                new AsyncCallable<@Nullable Void>() {
                  @Override
                  public ListenableFuture<@Nullable Void> call() {
                    return settableFuture;
                  }
                },
                directExecutor());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

      public void testSameThreadSuccess() {
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Nov 15 16:33:21 GMT 2022
    - 6.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

        assertEquals("foo", getChecked(immediateFuture("foo"), TwoArgConstructorException.class));
      }
    
      public void testGetCheckedUntimed_interrupted() {
        SettableFuture<String> future = SettableFuture.create();
        Thread.currentThread().interrupt();
        try {
          getChecked(future, TwoArgConstructorException.class);
          fail();
        } catch (TwoArgConstructorException expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 16.4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/AbstractFutureInnocuousThreadTest.java

      private Class<?> settableFutureClass;
      private SecurityManager oldSecurityManager;
    
      @Override
      protected void setUp() throws Exception {
        // Load the "normal" copy of SettableFuture and related classes.
        SettableFuture<?> unused = SettableFuture.create();
        // Hack to load AbstractFuture et. al. in a new classloader so that it tries to re-read the
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 5.1K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

      public void testSameThreadSuccess() {
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
        addCallback(f, callback, directExecutor());
        f.set("foo");
      }
    
      public void testExecutorSuccess() {
        CountingSameThreadExecutor ex = new CountingSameThreadExecutor();
        SettableFuture<String> f = SettableFuture.create();
        MockCallback callback = new MockCallback("foo");
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

      // together.  Now it should only be limited by available memory (and time)
      public void testSetFuture_stackOverflow() {
        SettableFuture<String> orig = SettableFuture.create();
        SettableFuture<String> prev = orig;
        for (int i = 0; i < 100000; i++) {
          SettableFuture<String> curr = SettableFuture.create();
          prev.setFuture(curr);
          prev = curr;
        }
        // prev represents the 'innermost' future
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/UninterruptibleFutureTest.java

        SettableFuture<String> future = SettableFuture.create();
        FutureTask<Boolean> interruptReporter = untimedInterruptReporter(future, false);
    
        runNInterruptsTest(times, future, interruptReporter);
      }
    
      private static void runTimedInterruptsTest(int times)
          throws InterruptedException, ExecutionException, TimeoutException {
        SettableFuture<String> future = SettableFuture.create();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.1K bytes
    - Viewed (0)
Back to top