Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for Future (0.2 sec)

  1. 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 {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  2. 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 {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  3. 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;
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 98.5K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AggregateFuture.java

      protected final void afterDone() {
        super.afterDone();
    
        ImmutableCollection<? extends Future<?>> localFutures = futures;
        releaseResources(OUTPUT_FUTURE_DONE); // nulls out `futures`
    
        if (isCancelled() & localFutures != null) {
          boolean wasInterrupted = wasInterrupted();
          for (Future<?> future : localFutures) {
            future.cancel(wasInterrupted);
          }
        }
        /*
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractAbstractFutureTest.java

      private static void assertSetAsynchronously(AbstractFuture<Integer> future) {
        assertCannotSet(future);
        assertPending(future);
      }
    
      private static void assertPending(AbstractFuture<Integer> future) {
        assertThat(future.isDone()).isFalse();
        assertThat(future.isCancelled()).isFalse();
    
        CountingRunnable listener = new CountingRunnable();
        future.addListener(listener, directExecutor());
        listener.assertNotRun();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/AbstractFuture.java

      @CanIgnoreReturnValue
      protected boolean setFuture(ListenableFuture<? extends V> future) {
        checkNotNull(future);
    
        // If this future is already cancelled, cancel the delegate.
        // TODO(cpovirk): Should we do this at the end of the method, as in the server version?
        // TODO(cpovirk): Use maybePropagateCancellationTo?
        if (isCancelled()) {
          future.cancel(mayInterruptIfRunning);
        }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jan 22 19:37:41 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. 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
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 59.6K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/MoreExecutors.java

          Callable<T> task,
          final BlockingQueue<Future<T>> queue) {
        final ListenableFuture<T> future = executorService.submit(task);
        future.addListener(
            new Runnable() {
              @Override
              public void run() {
                queue.add(future);
              }
            },
            directExecutor());
        return future;
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Apr 17 16:33:44 GMT 2024
    - 41.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/TimeoutFuture.java

    import java.util.concurrent.Future;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import javax.annotation.CheckForNull;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Implementation of {@code Futures#withTimeout}.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  10. 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();
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
Back to top