Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 908 for Callable (0.23 sec)

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

    import java.util.concurrent.Callable;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.TimeUnit;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * An abstract {@code ScheduledExecutorService} that allows subclasses to {@linkplain
     * #wrapTask(Callable) wrap} tasks before they are submitted to the underlying executor.
     *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

      }
    
      public void testSubmit_callable_returnsValue() throws Exception {
        Callable<Integer> callable =
            new Callable<Integer>() {
              @Override
              public Integer call() {
                return 42;
              }
            };
        ListenableFuture<Integer> future = submit(callable, directExecutor());
        assertThat(future.isDone()).isTrue();
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

        Callable<@Nullable Void> cancelRunnable =
            new Callable<@Nullable Void>() {
              @Override
              public @Nullable Void call() {
                cancellationSuccess.set(currentFuture.get().cancel(true));
                awaitUnchecked(barrier);
                return null;
              }
            };
        Callable<@Nullable Void> setFutureCompleteSuccessfullyRunnable =
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 46.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AbstractListeningExecutorServiceTest.java

     */
    
    package com.google.common.util.concurrent;
    
    import static com.google.common.truth.Truth.assertThat;
    
    import com.google.common.collect.ImmutableList;
    import java.util.List;
    import java.util.concurrent.Callable;
    import java.util.concurrent.TimeUnit;
    import junit.framework.TestCase;
    
    /**
     * Tests for {@link AbstractListeningExecutorService}.
     *
     * @author Colin Decker
     */
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java

        List<Callable<T>> tasks = ImmutableList.of();
        List<? extends Future<?>> unused = executor.invokeAll(tasks);
      }
    
      public void testListeningDecorator() throws Exception {
        ListeningExecutorService service = listeningDecorator(newDirectExecutorService());
        assertSame(service, listeningDecorator(service));
        List<Callable<String>> callables = ImmutableList.of(Callables.returning("x"));
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 28.2K bytes
    - Viewed (3)
  6. android/guava/src/com/google/common/cache/Cache.java

    import com.google.errorprone.annotations.DoNotMock;
    import java.util.Map;
    import java.util.concurrent.Callable;
    import java.util.concurrent.ConcurrentMap;
    import java.util.concurrent.ExecutionException;
    import javax.annotation.CheckForNull;
    
    /**
     * A semi-persistent mapping from keys to values. Cache entries are manually added using {@link
     * #get(Object, Callable)} or {@link #put(Object, Object)}, and are stored in the cache until either
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Sun Aug 07 02:38:22 GMT 2022
    - 8.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

    import com.google.common.annotations.GwtIncompatible;
    import com.google.common.annotations.J2ktIncompatible;
    import java.util.ArrayList;
    import java.util.Random;
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.Future;
    import junit.framework.TestCase;
    
    /**
     * Basher test for {@link AtomicLongMap}.
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  8. android/guava-testlib/test/com/google/common/util/concurrent/testing/TestingExecutorsTest.java

        taskDone = false;
        Callable<Integer> task =
            new Callable<Integer>() {
              @Override
              public Integer call() {
                taskDone = true;
                return 6;
              }
            };
        Future<Integer> future =
            TestingExecutors.sameThreadScheduledExecutor().schedule(task, 10000, TimeUnit.MILLISECONDS);
        assertTrue("Should run callable immediately", taskDone);
    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)
  9. guava-tests/test/com/google/common/util/concurrent/ListeningExecutorServiceTest.java

    import java.util.Set;
    import java.util.concurrent.Callable;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.Future;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    
    public final class ListeningExecutorServiceTest extends TestCase {
    
      private Collection<? extends Callable<?>> recordedTasks;
      private long recordedTimeout;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Jun 02 12:45:23 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      }
    
      public static class NoOpCallable implements Callable<Object> {
        @Override
        public Object call() {
          return Boolean.TRUE;
        }
      }
    
      public static final String TEST_STRING = "a test string";
    
      public static class StringTask implements Callable<String> {
        public String call() {
          return TEST_STRING;
        }
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
Back to top