Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 27 for newFixedThreadPool (0.34 sec)

  1. guava-tests/test/com/google/common/util/concurrent/SimpleTimeLimiterTest.java

              }
              throw new SampleRuntimeException();
            }
          };
    
      private TimeLimiter service;
    
      private static final ExecutorService executor = Executors.newFixedThreadPool(1);
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        service = SimpleTimeLimiter.create(executor);
      }
    
      public void testNewProxy_goodMethodWithEnoughTime() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 9.5K 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);
        for (int i = numberOfThreads; i > 0; i--) {
    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-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testRunIdempotency() throws Exception {
        final int numThreads = 10;
        final ExecutorService executor = Executors.newFixedThreadPool(numThreads);
        for (int i = 0; i < 1000; i++) {
          final AtomicInteger counter = new AtomicInteger();
          final TrustedListenableFutureTask<Integer> task =
              TrustedListenableFutureTask.create(
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

        final int getsPerTask = 1000;
        final int deltaRange = 10000;
        final String key = "key";
    
        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>() {
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

        final int getsPerTask = 1000;
        final int deltaRange = 10000;
        final String key = "key";
    
        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>() {
    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)
  6. src/main/java/org/codelibs/fess/ds/callback/FileListIndexUpdateCallbackImpl.java

            executor = newFixedThreadPool(nThreads < 1 ? 1 : nThreads);
            final FessConfig fessConfig = ComponentUtil.getFessConfig();
            maxDeleteDocumentCacheSize = fessConfig.getIndexerDataMaxDeleteCacheSizeAsInteger();
            maxRedirectCount = fessConfig.getIndexerDataMaxRedirectCountAsInteger();
        }
    
        protected ExecutorService newFixedThreadPool(final int nThreads) {
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 16.8K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // blocking wait
      public void testRunIdempotency() throws Exception {
        final int numThreads = 10;
        final ExecutorService executor = Executors.newFixedThreadPool(numThreads);
        for (int i = 0; i < 1000; i++) {
          final AtomicInteger counter = new AtomicInteger();
          final TrustedListenableFutureTask<Integer> task =
              TrustedListenableFutureTask.create(
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

          cache.getUnchecked(s);
          expectedKeys.add(s);
        }
        computationShouldWait.set(true);
    
        final AtomicInteger computedCount = new AtomicInteger();
        ExecutorService threadPool = Executors.newFixedThreadPool(nThreads);
        final CountDownLatch tasksFinished = new CountDownLatch(nTasks);
        for (int i = 0; i < nTasks; i++) {
          final String s = "a" + i;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/AbstractFutureTest.java

                    + "class java.lang.RuntimeException\\]\\]");
      }
    
      public void testCompletionFinishesWithDone() {
        ExecutorService executor = Executors.newFixedThreadPool(10);
        for (int i = 0; i < 50000; i++) {
          final AbstractFuture<String> future = new AbstractFuture<String>() {};
          final AtomicReference<String> errorMessage = Atomics.newReference();
          executor.execute(
    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)
  10. android/guava-tests/test/com/google/common/graph/ValueGraphTest.java

    import static com.google.common.graph.TestUtil.assertStronglyEquivalent;
    import static com.google.common.truth.Truth.assertThat;
    import static java.util.concurrent.Executors.newFixedThreadPool;
    import static org.junit.Assert.assertThrows;
    
    import com.google.common.collect.ImmutableList;
    import java.util.Set;
    import java.util.concurrent.Callable;
    import java.util.concurrent.CyclicBarrier;
    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)
Back to top