Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 508 for Future (0.28 sec)

  1. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

        /**
         * Contains the most recently submitted {@code Future}, which may be cancelled or updated,
         * always under a lock.
         */
        private static final class SupplantableFuture implements Cancellable {
          private final ReentrantLock lock;
    
          @GuardedBy("lock")
          private Future<@Nullable Void> currentFuture;
    
          SupplantableFuture(ReentrantLock lock, Future<@Nullable Void> currentFuture) {
            this.lock = lock;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 13 19:45:20 GMT 2023
    - 25.8K bytes
    - Viewed (0)
  2. futures/failureaccess/src/com/google/common/util/concurrent/internal/InternalFutures.java

       *       return value of this method as its cause
       * </ul>
       */
      public static
          Throwable tryInternalFastPathGetFailure(InternalFutureFailureAccess future) {
        return future.tryInternalFastPathGetFailure();
      }
    
      private InternalFutures() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/util/concurrent/testing/SameThreadScheduledExecutorService.java

        return delegate.submit(task);
      }
    
      @Override
      public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
          throws InterruptedException {
        Preconditions.checkNotNull(tasks, "tasks must not be null!");
        return delegate.invokeAll(tasks);
      }
    
      @Override
      public <T> List<Future<T>> invokeAll(
          Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Oct 06 00:47:57 GMT 2021
    - 6.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

        final AtomicLongMap<String> map = AtomicLongMap.create();
    
        ExecutorService threadPool = Executors.newFixedThreadPool(nThreads);
        ArrayList<Future<Long>> futures = new ArrayList<>();
        for (int i = 0; i < nTasks; i++) {
          futures.add(
              threadPool.submit(
                  new Callable<Long>() {
                    @Override
                    public Long call() {
                      long threadSum = 0;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/CallablesTest.java

              }
            };
    
        AsyncCallable<String> asyncCallable =
            Callables.asAsyncCallable(callable, MoreExecutors.newDirectExecutorService());
    
        ListenableFuture<String> future = asyncCallable.call();
        assertSame(expected, future.get());
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testAsAsyncCallable_exception() throws Exception {
        final Exception expected = new IllegalArgumentException();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/cache/CacheLoaderTest.java

    import com.google.common.collect.ImmutableMap;
    import com.google.common.collect.Queues;
    import com.google.common.util.concurrent.Futures;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.Deque;
    import java.util.Map;
    import java.util.concurrent.Executor;
    import java.util.concurrent.Future;
    import java.util.concurrent.atomic.AtomicInteger;
    import junit.framework.TestCase;
    
    /**
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Aug 05 17:21:46 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  7. 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)
  8. guava-testlib/src/com/google/common/testing/GcFinalization.java

      }
    
      /**
       * Waits until the given future {@linkplain Future#isDone is done}, invoking the garbage collector
       * as necessary to try to ensure that this will happen.
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      @SuppressWarnings("removal") // b/260137033
      public static void awaitDone(Future<?> future) {
        if (future.isDone()) {
          return;
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K 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/CallablesTest.java

              }
            };
    
        AsyncCallable<String> asyncCallable =
            Callables.asAsyncCallable(callable, MoreExecutors.newDirectExecutorService());
    
        ListenableFuture<String> future = asyncCallable.call();
        assertSame(expected, future.get());
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testAsAsyncCallable_exception() throws Exception {
        final Exception expected = new IllegalArgumentException();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 5.4K bytes
    - Viewed (0)
Back to top