Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 91 for executorService (0.3 sec)

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

       * ExecutorService#shutdownNow()} and returns.
       *
       * @param service the {@code ExecutorService} to shut down
       * @param timeout the maximum time to wait for the {@code ExecutorService} to terminate
       * @param unit the time unit of the timeout argument
       * @return {@code true} if the {@code ExecutorService} was terminated successfully, {@code false}
    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)
  2. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

      @GwtIncompatible // concurrency
      private void runConcurrentTest(int numberOfThreads, final Callable<@Nullable Void> callable)
          throws Exception {
        ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads);
        final CountDownLatch startLatch = new CountDownLatch(numberOfThreads);
        final CountDownLatch doneLatch = new CountDownLatch(numberOfThreads);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

    import com.google.common.util.concurrent.ListenableFuture;
    import java.util.concurrent.CancellationException;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.ExecutionException;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.Future;
    import java.util.concurrent.TimeUnit;
    import java.util.concurrent.TimeoutException;
    import junit.framework.TestCase;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

      }
    
      public void testListenInPoolThreadUsesGivenExecutor() throws Exception {
        ExecutorService executorService =
            newCachedThreadPool(new ThreadFactoryBuilder().setDaemon(true).build());
        NonListenableSettableFuture<String> abstractFuture = NonListenableSettableFuture.create();
        ExecutorSpy spy = new ExecutorSpy(executorService);
        ListenableFuture<String> listenableFuture = listenInPoolThread(abstractFuture, spy);
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/Uninterruptibles.java

          }
        }
      }
    
      /**
       * Invokes {@code executor.}{@link ExecutorService#awaitTermination(long, TimeUnit)
       * awaitTermination(long, TimeUnit)} uninterruptibly with no timeout.
       *
       * @since 30.0
       */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static void awaitTerminationUninterruptibly(ExecutorService executor) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 14.4K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

      private final ExecutorService executor;
    
      private SimpleTimeLimiter(ExecutorService executor) {
        this.executor = checkNotNull(executor);
      }
    
      /**
       * Creates a TimeLimiter instance using the given executor service to execute method calls.
       *
       * <p><b>Warning:</b> using a bounded executor may be counterproductive! If the thread pool fills
       * up, any time callers spend waiting for a thread may count toward their time limit, and in this
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/util/concurrent/ExecutionListBenchmark.java

            }
          };
    
      @BeforeExperiment
      void setUp() throws Exception {
        executorService =
            new ThreadPoolExecutor(
                NUM_THREADS,
                NUM_THREADS,
                Long.MAX_VALUE,
                TimeUnit.SECONDS,
                new ArrayBlockingQueue<Runnable>(1000));
        executorService.prestartAllCoreThreads();
        final AtomicInteger integer = new AtomicInteger();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 17 15:19:38 GMT 2023
    - 20.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/WrappingExecutorService.java

     *
     * @author Chris Nokleberg
     */
    @J2ktIncompatible
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    abstract class WrappingExecutorService implements ExecutorService {
      private final ExecutorService delegate;
    
      protected WrappingExecutorService(ExecutorService delegate) {
        this.delegate = checkNotNull(delegate);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 04 09:45:04 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/util/concurrent/testing/TestingExecutors.java

    import java.util.concurrent.Delayed;
    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.ScheduledExecutorService;
    import java.util.concurrent.ScheduledFuture;
    import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
    import java.util.concurrent.TimeUnit;
    
    /**
     * Factory methods for {@link ExecutorService} for testing.
     *
     * @author Chris Nokleberg
     * @since 14.0
     */
    @GwtIncompatible
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri May 26 22:04:00 GMT 2023
    - 6.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.TimeUnit;
    import org.checkerframework.checker.nullness.qual.Nullable;
    
    /**
     * Used to test listenable future implementations.
     *
     * @author Sven Mawson
     */
    public class ListenableFutureTester {
    
      private final ExecutorService exec;
      private final ListenableFuture<?> future;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
Back to top