Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 720 for futures (0.49 sec)

  1. android/guava-tests/test/com/google/common/eventbus/EventBusTest.java

        List<Future<?>> futures = new ArrayList<>();
        ExecutorService executor = 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();
        }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  2. guava/src/com/google/common/cache/CacheLoader.java

     * the License.
     */
    
    package com.google.common.cache;
    
    import static com.google.common.base.Preconditions.checkNotNull;
    import static com.google.common.util.concurrent.Futures.immediateFuture;
    
    import com.google.common.annotations.GwtCompatible;
    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import com.google.common.base.Function;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  3. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java

    import java.util.concurrent.Executor;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Hidden superclass of {@link Futures} that provides us a place to declare special GWT versions of
     * the {@link Futures#catching(ListenableFuture, Class, com.google.common.base.Function)
     * Futures.catching} family of methods. Those versions have slightly different signatures.
     */
    abstract class GwtFuturesCatchingSpecialization {
      /*
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.concurrent.Future;
    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Classes and futures used in {@link FuturesGetCheckedTest} and {@link FuturesGetUncheckedTest}.
     */
    @GwtCompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedInputs.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.util.concurrent.Futures.immediateFailedFuture;
    
    import com.google.common.annotations.GwtCompatible;
    import java.util.concurrent.Future;
    import org.jspecify.annotations.NullUnmarked;
    import org.jspecify.annotations.Nullable;
    
    /**
     * Classes and futures used in {@link FuturesGetCheckedTest} and {@link FuturesGetUncheckedTest}.
     */
    @GwtCompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/collect/ConcurrentHashMultisetBasherTest.java

        try {
          List<Future<int[]>> futures = newArrayListWithExpectedSize(nTasks);
          for (int i = 0; i < nTasks; i++) {
            futures.add(pool.submit(new MutateTask(multiset, keys)));
          }
    
          int[] deltas = new int[3];
          for (Future<int[]> future : futures) {
            int[] taskDeltas = future.get();
            for (int i = 0; i < deltas.length; i++) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 6K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/FutureCallbackTest.java

              }
    
              @Override
              public void onFailure(Throwable t) {
                failureCalls[0]++;
              }
            };
        addCallback(future, callback, directExecutor());
        future.set(result);
        assertEquals(result, future.get());
        assertThat(successCalls[0]).isEqualTo(1);
        assertThat(failureCalls[0]).isEqualTo(0);
      }
    
      public void testOnSuccessThrowsError() throws Exception {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/FluentFuture.java

       * completing the returned {@code Future}.)
       *
       * <p>The returned {@code Future} attempts to keep its cancellation state in sync with that of the
       * input future and that of the future returned by the chain function. That is, if the returned
       * {@code Future} is cancelled, it will attempt to cancel the other two, and if either of the
       * other two is cancelled, the returned {@code Future} will receive a callback in which it will
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java

    import java.net.URLClassLoader;
    import java.util.concurrent.CancellationException;
    import java.util.concurrent.Future;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    import org.jspecify.annotations.NullUnmarked;
    
    /** Unit tests for {@link Futures#getChecked(Future, Class)}. */
    @NullUnmarked
    public class FuturesGetCheckedTest extends TestCase {
      // Boring untimed-get tests:
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 16.4K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

    import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
    import java.util.logging.Level;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A helper which does some thread-safe operations for aggregate futures, which must be implemented
     * differently in GWT. Namely:
     *
     * <ul>
     *   <li>Lazily initializes a set of seen exceptions
     *   <li>Decrements a counter atomically
     * </ul>
     */
    @GwtCompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.5K bytes
    - Viewed (0)
Back to top