Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 385 for Futures (0.16 sec)

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

          Class<X> exceptionType,
          Function<? super X, ? extends V> fallback,
          Executor executor) {
        CatchingFuture<V, X> future = new CatchingFuture<>(input, exceptionType, fallback);
        input.addListener(future, rejectionPropagatingExecutor(executor, future));
        return future;
      }
    
      static <X extends Throwable, V extends @Nullable Object> ListenableFuture<V> create(
          ListenableFuture<? extends V> input,
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 01 21:46:34 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/cache/TestingCacheLoaders.java

    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.collect.Maps;
    import com.google.common.util.concurrent.Futures;
    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.Map;
    import java.util.concurrent.atomic.AtomicInteger;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/eventbus/EventBusTest.java

        List<Future<?>> futures = Lists.newArrayList();
        ExecutorService executor = Executors.newFixedThreadPool(10);
        int numberOfCatchers = 10000;
        for (int i = 0; i < numberOfCatchers; i++) {
          futures.add(executor.submit(new Registrator(bus, catchers)));
        }
        for (int i = 0; i < numberOfCatchers; i++) {
          futures.get(i).get();
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

        List<Future<?>> futures = Lists.newArrayList();
        ExecutorService executor = Executors.newFixedThreadPool(10);
        int numberOfCatchers = 10000;
        for (int i = 0; i < numberOfCatchers; i++) {
          futures.add(executor.submit(new Registrator(bus, catchers)));
        }
        for (int i = 0; i < numberOfCatchers; i++) {
          futures.get(i).get();
        }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

              future = setFuture.owner;
              if (future.value == setFuture) {
                Object valueToSet = getFutureValue(setFuture.future);
                if (ATOMIC_HELPER.casValue(future, setFuture, valueToSet)) {
                  continue outer;
                }
              }
              // otherwise the future we were trying to set is already done.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToFutureTest.java

     * limitations under the License.
     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly;
    import static org.junit.Assert.assertThrows;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.7K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/graph/ValueGraphTest.java

                      return null;
                    }
                  }));
        }
    
        // For more about this test, see the equivalent in AbstractNetworkTest.
        for (Future<?> future : futures.build()) {
          future.get();
        }
        executor.shutdown();
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 17.4K 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. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

    import com.google.common.testing.TestLogHandler;
    import com.google.common.util.concurrent.Callables;
    import com.google.common.util.concurrent.ExecutionError;
    import com.google.common.util.concurrent.Futures;
    import com.google.common.util.concurrent.ListenableFuture;
    import com.google.common.util.concurrent.UncheckedExecutionException;
    import java.io.IOException;
    import java.lang.ref.WeakReference;
    import java.util.List;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  10. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 15.5K bytes
    - Viewed (0)
Back to top