Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 19 of 19 for SettableFuture (0.21 sec)

  1. 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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

         * have completed - namely after oldFuture is done, and taskFuture has either completed or been
         * cancelled before the callable started execution.
         */
        SettableFuture<@Nullable Void> newFuture = SettableFuture.create();
    
        ListenableFuture<@Nullable Void> oldFuture = ref.getAndSet(newFuture);
    
        // Invoke our task once the previous future completes.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetUncheckedTest.java

          assertTrue(Thread.currentThread().isInterrupted());
        } finally {
          Thread.interrupted();
        }
      }
    
      public void testGetUnchecked_cancelled() {
        SettableFuture<String> future = SettableFuture.create();
        future.cancel(true);
        try {
          getUnchecked(future);
          fail();
        } catch (CancellationException expected) {
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

       * internal, unbounded pool at the first call to {@code addListener} and holding it until the
       * future is {@linkplain Future#isDone() done}.
       *
       * <p>Prefer to create {@code ListenableFuture} instances with {@link SettableFuture}, {@link
       * MoreExecutors#listeningDecorator( java.util.concurrent.ExecutorService)}, {@link
       * ListenableFutureTask}, {@link AbstractFuture}, and other utilities over creating plain {@code
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/LocalCacheTest.java

      }
    
      public void testLongAsyncRefresh() throws Exception {
        FakeTicker ticker = new FakeTicker();
        CountDownLatch reloadStarted = new CountDownLatch(1);
        SettableFuture<Thread> threadAboutToBlockForRefresh = SettableFuture.create();
    
        ListeningExecutorService refreshExecutor = listeningDecorator(newSingleThreadExecutor());
        try {
          CacheBuilder<Object, Object> builder =
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 112.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/cache/LocalCacheTest.java

      }
    
      public void testLongAsyncRefresh() throws Exception {
        FakeTicker ticker = new FakeTicker();
        CountDownLatch reloadStarted = new CountDownLatch(1);
        SettableFuture<Thread> threadAboutToBlockForRefresh = SettableFuture.create();
    
        ListeningExecutorService refreshExecutor = listeningDecorator(newSingleThreadExecutor());
        try {
          CacheBuilder<Object, Object> builder =
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Mar 14 23:06:48 GMT 2024
    - 110.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

    /**
     * An abstract implementation of {@link ListenableFuture}, intended for advanced users only. More
     * common ways to create a {@code ListenableFuture} include instantiating a {@link SettableFuture},
     * submitting a task to a {@link ListeningExecutorService}, and deriving a {@code Future} from an
     * existing one, typically using methods like {@link Futures#transform(ListenableFuture,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/LocalCache.java

        volatile ValueReference<K, V> oldValue;
    
        // TODO(fry): rename get, then extend AbstractFuture instead of containing SettableFuture
        final SettableFuture<V> futureValue = SettableFuture.create();
        final Stopwatch stopwatch = Stopwatch.createUnstarted();
    
        public LoadingValueReference() {
          this(null);
        }
    
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 150.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/cache/LocalCache.java

        volatile ValueReference<K, V> oldValue;
    
        // TODO(fry): rename get, then extend AbstractFuture instead of containing SettableFuture
        final SettableFuture<V> futureValue = SettableFuture.create();
        final Stopwatch stopwatch = Stopwatch.createUnstarted();
    
        public LoadingValueReference() {
          this(LocalCache.<K, V>unset());
        }
    
        /*
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 144.7K bytes
    - Viewed (0)
Back to top