Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 264 for Future (0.22 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 Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  2. 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)
  3. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_ERROR;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_OTHER_THROWABLE;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.FAILED_FUTURE_UNCHECKED_EXCEPTION;
    import static com.google.common.util.concurrent.FuturesGetCheckedInputs.OTHER_THROWABLE;
    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)
  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/UncheckedThrowingFuture.java

        UncheckedThrowingFuture<V> future = new UncheckedThrowingFuture<V>();
        future.complete(checkNotNull(error));
        return future;
      }
    
      public static <V> ListenableFuture<V> throwingRuntimeException(RuntimeException e) {
        UncheckedThrowingFuture<V> future = new UncheckedThrowingFuture<V>();
        future.complete(checkNotNull(e));
        return future;
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 12 20:02:10 GMT 2018
    - 3.2K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      }
    
      /**
       * Invokes {@code future.}{@link Future#get() get()} uninterruptibly.
       *
       * <p>Similar methods:
       *
       * <ul>
       *   <li>To retrieve a result from a {@code Future} that is already done, use {@link
       *       Futures#getDone Futures.getDone}.
       *   <li>To treat {@link InterruptedException} uniformly with other exceptions, use {@link
       *       Futures#getChecked(Future, Class) Futures.getChecked}.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
  7. 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);
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Jan 05 19:41:03 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  8. 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)
  9. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

        assertFalse(future.isCancelled());
    
        ExecutorService executor = Executors.newSingleThreadExecutor();
    
        try {
          Future<Boolean> getResult = executor.submit(() -> future.get());
    
          // Release the future value.
          latch.countDown();
    
          assertTrue(getResult.get(10, SECONDS));
        } finally {
          executor.shutdownNow();
        }
    
        assertTrue(future.isDone());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertTrue(latch.await(5, TimeUnit.SECONDS));
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
    
        assertEquals(expectedValue, future.get());
      }
    
      public void testCancelledFuture() throws InterruptedException, ExecutionException {
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
Back to top