Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 172 for Futures (0.19 sec)

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

       *
       * <p>Cancelling a delegate future propagates to input futures once all the delegates complete,
       * either from cancellation or because an input future has completed. If N futures are passed in,
       * and M delegates are cancelled, the remaining M input futures will be cancelled once N - M of
       * the input futures complete. If all the delegates are cancelled, all the input futures will be
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Apr 01 16:15:01 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  2. futures/listenablefuture1/src/com/google/common/util/concurrent/ListenableFuture.java

     * result. (If you want such access, you may prefer {@link Futures#addCallback
     * Futures.addCallback}.) Still, direct {@code addListener} calls are occasionally useful:
     *
     * <pre>{@code
     * final String name = ...;
     * inFlight.add(name);
     * ListenableFuture<Result> future = service.query(name);
     * future.addListener(new Runnable() {
     *   public void run() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 26 21:13:41 UTC 2023
    - 8K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Object> future1 = SettableFuture.create();
        SettableFuture<Object> future2 = SettableFuture.create();
        SettableFuture<Object> future3 = SettableFuture.create();
        ListenableFuture<List<Object>> all = allAsList(future1, future2, future3);
    
        future1.setException(new MyException());
        future2.setException(new MyException());
        future3.setException(new MyException());
    
        try {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 144.1K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<Object> future1 = SettableFuture.create();
        SettableFuture<Object> future2 = SettableFuture.create();
        SettableFuture<Object> future3 = SettableFuture.create();
        ListenableFuture<List<Object>> all = allAsList(future1, future2, future3);
    
        future1.setException(new MyException());
        future2.setException(new MyException());
        future3.setException(new MyException());
    
        try {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed May 29 16:29:37 UTC 2024
    - 144.1K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/WrappingExecutorServiceTest.java

          List<Future<String>> futures = testExecutor.invokeAll(tasks);
          mock.assertLastMethodCalled("invokeAll");
          checkResults(futures);
        }
        {
          MockExecutor mock = new MockExecutor();
          TimeUnit unit = TimeUnit.SECONDS;
          long timeout = 5;
          TestExecutor testExecutor = new TestExecutor(mock);
          List<Future<String>> futures = testExecutor.invokeAll(tasks, timeout, unit);
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Jan 05 19:41:03 UTC 2023
    - 9.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        InterruptibleFuture future = new InterruptibleFuture();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertFalse(future.wasInterrupted());
        assertFalse(future.interruptTaskWasCalled);
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertThat(e).hasCauseThat().isNull();
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Jun 11 16:13:05 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/ClosingFuture.java

        }
    
        private final ClosingFuture<V1> future1;
        private final ClosingFuture<V2> future2;
        private final ClosingFuture<V3> future3;
    
        private Combiner3(
            ClosingFuture<V1> future1, ClosingFuture<V2> future2, ClosingFuture<V3> future3) {
          super(true, ImmutableList.of(future1, future2, future3));
          this.future1 = future1;
          this.future2 = future2;
          this.future3 = future3;
        }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 07 12:37:15 UTC 2024
    - 98.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/CacheLoader.java

       *     the thread's interrupt status is set
       * @since 11.0
       */
      @GwtIncompatible // Futures
      public ListenableFuture<V> reload(K key, V oldValue) throws Exception {
        checkNotNull(key);
        checkNotNull(oldValue);
        return Futures.immediateFuture(load(key));
      }
    
      /**
       * Computes or retrieves the values corresponding to {@code keys}. This method is called by {@link
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 19 20:20:14 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

          ImmutableCollection<? extends ListenableFuture<?>> futures,
          boolean allMustSucceed,
          Executor listenerExecutor,
          AsyncCallable<V> callable) {
        super(futures, allMustSucceed, false);
        this.task = new AsyncCallableInterruptibleTask(callable, listenerExecutor);
        init();
      }
    
      CombinedFuture(
          ImmutableCollection<? extends ListenableFuture<?>> futures,
          boolean allMustSucceed,
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 01 21:46:34 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListeningExecutorServiceTest.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    
    import java.time.Duration;
    import java.util.Collection;
    import java.util.Collections;
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri Jun 02 12:45:23 UTC 2023
    - 4.5K bytes
    - Viewed (0)
Back to top