Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for awaitTermination (0.24 sec)

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

        ListeningDecorator(ExecutorService delegate) {
          this.delegate = checkNotNull(delegate);
        }
    
        @Override
        public final boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
          return delegate.awaitTermination(timeout, unit);
        }
    
        @Override
        public final boolean isShutdown() {
          return delegate.isShutdown();
        }
    
        @Override
    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-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
      }
    
      /** a deserialized serialized array holds same values */
      public void testSerialization() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 14.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/fess/helper/DataIndexHelper.java

                return running;
            }
    
            public void awaitTermination() {
                try {
                    join();
                } catch (final InterruptedException e) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Interrupted.", e);
                    }
                }
            }
    
            public void awaitTermination(final long mills) {
                try {
                    join(mills);
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 12K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                        }
                      }
                      return threadSum;
                    }
                  }));
        }
        threadPool.shutdown();
        assertTrue(threadPool.awaitTermination(300, SECONDS));
        long sum = 0;
        for (Future<Long> f : futures) {
          sum += f.get();
        }
        assertEquals(sum, map.get(key));
      }
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       * Thread#join(long)}), else interrupts the thread (in the hope that it may terminate later) and
       * fails.
       */
      void awaitTermination(Thread t) {
        awaitTermination(t, LONG_DELAY_MS);
      }
    
      // Some convenient Runnable classes
    
      public abstract class CheckedRunnable implements Runnable {
        protected abstract void realRun() throws Throwable;
    
    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)
  6. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

       * Thread#join(long)}), else interrupts the thread (in the hope that it may terminate later) and
       * fails.
       */
      void awaitTermination(Thread t) {
        awaitTermination(t, LONG_DELAY_MS);
      }
    
      // Some convenient Runnable classes
    
      public abstract class CheckedRunnable implements Runnable {
        protected abstract void realRun() throws Throwable;
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  7. src/main/java/org/codelibs/fess/helper/WebFsIndexHelper.java

                        if (crawlerList.get(i).getCrawlerContext().getStatus() == CrawlerStatus.DONE
                                && Constants.RUNNING.equals(crawlerStatusList.get(i))) {
                            crawlerList.get(i).awaitTermination();
                            crawlerStatusList.set(i, Constants.DONE);
                            final String sid = crawlerList.get(i).getCrawlerContext().getSessionId();
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AtomicLongMapBasherTest.java

                        }
                      }
                      return threadSum;
                    }
                  }));
        }
        threadPool.shutdown();
        assertTrue(threadPool.awaitTermination(300, SECONDS));
        long sum = 0;
        for (Future<Long> f : futures) {
          sum += f.get();
        }
        assertEquals(sum, map.get(key));
      }
    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)
  9. src/test/java/org/codelibs/fess/helper/CrawlingInfoHelperTest.java

                    assertEquals(result, crawlingInfoHelper.generateId(dataMap));
                    counter.incrementAndGet();
                });
            }
            pool.shutdown();
            pool.awaitTermination(10, TimeUnit.SECONDS);
            assertEquals(1000, counter.get());
        }
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java

        assertThat(future2.isDone()).isFalse();
    
        // Stop the first task. The second task should then run.
        blockingCallable.stop();
        executor.shutdown();
        assertThat(executor.awaitTermination(10, TimeUnit.SECONDS)).isTrue();
        assertThat(getDone(future2)).isFalse();
      }
    
      public void testSecondTaskWaitsForFirstEvenIfCancelled() throws Exception {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 16.8K bytes
    - Viewed (0)
Back to top