Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 773 for future (0.41 sec)

  1. 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)
  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() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 21:13:41 GMT 2023
    - 8K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

     *       Future} is "completed" even if it is cancelled while its underlying work continues on a
     *       thread, an RPC, etc. The {@code Future} is also "completed" if it fails "early" -- for
     *       example, if the deadline expires on a {@code Future} returned from {@link
     *       Futures#withTimeout} while the {@code Future} it wraps continues its underlying work. So
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. 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)
  7. android/guava/src/com/google/common/util/concurrent/CombinedFuture.java

        super.releaseResources(reason);
        /*
         * If the output future is done, then it won't need to interrupt the task later, so it can clear
         * its reference to it.
         *
         * If the output future is *not* done, then the task field will be cleared after the task runs
         * or after the output future is done, whichever comes first.
         */
        if (reason == OUTPUT_FUTURE_DONE) {
          this.task = null;
        }
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 6.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

      /**
       * Sets the result of this {@code Future} to match the supplied input {@code Future} once the
       * supplied {@code Future} is done, unless this {@code Future} has already been cancelled or set
       * (including "set asynchronously," defined below).
       *
       * <p>If the supplied future is {@linkplain #isDone done} when this method is called and the call
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/util/concurrent/AsyncCallable.java

     * result.
     *
     * @since 20.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public interface AsyncCallable<V extends @Nullable Object> {
      /**
       * Computes a result {@code Future}. The output {@code Future} need not be {@linkplain
       * Future#isDone done}, making {@code AsyncCallable} suitable for asynchronous derivations.
       *
       * <p>Throwing an exception from this method is equivalent to returning a failing {@link
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Dec 14 15:53:12 GMT 2021
    - 1.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/TestPlatform.java

      }
    
      /**
       * Retrieves the result of a {@code Future} known to be done but uses the {@code get(long,
       * TimeUnit)} overload in order to test that method.
       */
      static <V> V getDoneFromTimeoutOverload(Future<V> future) throws ExecutionException {
        checkState(future.isDone(), "Future was expected to be done: %s", future);
        try {
          return getUninterruptibly(future, 0, SECONDS);
        } catch (TimeoutException e) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.9K bytes
    - Viewed (0)
Back to top