Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 154 for Future (0.37 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/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)
  3. 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 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.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 {
    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)
  5. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java

      static final Future<String> FAILED_FUTURE_OTHER_THROWABLE =
          immediateFailedFuture(OTHER_THROWABLE);
      static final Error ERROR = new Error("mymessage");
      static final Future<String> FAILED_FUTURE_ERROR = immediateFailedFuture(ERROR);
      static final Future<String> RUNTIME_EXCEPTION_FUTURE =
          UncheckedThrowingFuture.throwingRuntimeException(RUNTIME_EXCEPTION);
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 13:46:56 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/AbstractFutureCancellationCauseTest.java

      }
    
      public void testCancel_notDoneNoInterrupt() throws Exception {
        Future<?> future = newFutureInstance();
        assertTrue(future.cancel(false));
        assertTrue(future.isCancelled());
        assertTrue(future.isDone());
        assertNull(tryInternalFastPathGetFailure(future));
        CancellationException e = assertThrows(CancellationException.class, () -> future.get());
        assertNotNull(e.getCause());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.1K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

        checkNotNull(timeoutUnit);
        checkPositiveTimeout(timeoutDuration);
    
        Future<T> future = executor.submit(callable);
    
        try {
          return amInterruptible
              ? future.get(timeoutDuration, timeoutUnit)
              : getUninterruptibly(future, timeoutDuration, timeoutUnit);
        } catch (InterruptedException e) {
          future.cancel(true);
          throw e;
        } catch (ExecutionException e) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

    @GwtIncompatible
    public class MockFutureListener implements Runnable {
      private final CountDownLatch countDownLatch;
      private final ListenableFuture<?> future;
    
      public MockFutureListener(ListenableFuture<?> future) {
        this.countDownLatch = new CountDownLatch(1);
        this.future = future;
    
        future.addListener(this, directExecutor());
      }
    
      @Override
      public void run() {
        countDownLatch.countDown();
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/CollectionFuture.java

      CollectionFuture(
          ImmutableCollection<? extends ListenableFuture<? extends V>> futures,
          boolean allMustSucceed) {
        super(futures, allMustSucceed, true);
    
        List<@Nullable Present<V>> values =
            futures.isEmpty()
                ? Collections.<@Nullable Present<V>>emptyList()
                : Lists.<@Nullable Present<V>>newArrayListWithCapacity(futures.size());
    
        // Populate the results list with null initially.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  10. 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)
Back to top