Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

      }
    
      /**
       * Returns a new {@code Future} whose result is asynchronously derived from the result of this
       * {@code Future}. If the input {@code Future} fails, the returned {@code Future} fails with the
       * same exception (and the function is not invoked).
       *
       * <p>More precisely, the returned {@code Future} takes its result from a {@code Future} produced
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 11 19:08:44 GMT 2023
    - 18.7K 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/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)
  5. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        private final ListenableFuture<@Nullable Void> future;
        private boolean called = false;
    
        private TestCallable(ListenableFuture<@Nullable Void> future) {
          this.future = future;
        }
    
        @Override
        public ListenableFuture<@Nullable Void> call() throws Exception {
          called = true;
          return future;
        }
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        private final ListenableFuture<@Nullable Void> future;
        private boolean called = false;
    
        private TestCallable(ListenableFuture<@Nullable Void> future) {
          this.future = future;
        }
    
        @Override
        public ListenableFuture<@Nullable Void> call() throws Exception {
          called = true;
          return future;
        }
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/util/concurrent/FuturesGetCheckedBenchmark.java

        }
      }
    
      private enum Result {
        SUCCESS(immediateFuture(new Object())),
        FAILURE(immediateFailedFuture(new Exception()));
    
        final Future<Object> future;
    
        Result(Future<Object> result) {
          this.future = result;
        }
      }
    
      private enum ExceptionType {
        CHECKED(IOException.class),
        UNCHECKED(RuntimeException.class);
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Mar 22 03:01:34 GMT 2022
    - 6.5K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top