Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 240 for Future (0.16 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. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. android/guava/src/com/google/common/util/concurrent/AbstractTransformFuture.java

         * Future, then a call setException() would likely also overflow.
         *
         * - If the stack overflowed after set()/setValue() stored its result, then a call to
         * setException() will be a no-op because the Future is already done.
         *
         * Both scenarios are bad: The output Future might never complete, or, if it does complete, it
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  8. 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)
  9. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/project/ProjectModelResolver.java

        @Override
        public ModelSource resolveModel(final Parent parent, AtomicReference<Parent> modified)
                throws UnresolvableModelException {
            Result result;
            try {
                Future<Result> future = parentCache.computeIfAbsent(parent.getId(), id -> {
                    ForkJoinPool pool = new ForkJoinPool(MAX_CAP);
                    ForkJoinTask<Result> task = new ForkJoinTask<>() {
                        Result result;
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 15.8K bytes
    - Viewed (0)
Back to top