Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 97 for CountDownLatch (0.11 sec)

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

        ExecutorService service = newFixedThreadPool(4);
        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        try {
          queue.addListener(listener, service);
    
          CountDownLatch latch = new CountDownLatch(1);
          Multiset<Object> counters = ConcurrentHashMultiset.create();
          queue.enqueue(incrementingEvent(counters, listener, 1));
          queue.enqueue(incrementingEvent(counters, listener, 2));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        ExecutorService service = newFixedThreadPool(4);
        ListenerCallQueue<Object> queue = new ListenerCallQueue<>();
        try {
          queue.addListener(listener, service);
    
          CountDownLatch latch = new CountDownLatch(1);
          Multiset<Object> counters = ConcurrentHashMultiset.create();
          queue.enqueue(incrementingEvent(counters, listener, 1));
          queue.enqueue(incrementingEvent(counters, listener, 2));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  3. fess-crawler/src/test/java/org/codelibs/fess/crawler/transformer/impl/AbstractTransformerTest.java

         */
        public void test_concurrentNameAccess() throws Exception {
            final int threadCount = 100;
            final int operationsPerThread = 100;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
            final AtomicInteger errorCount = new AtomicInteger(0);
    
            testTransformer.setName("concurrentName");
    
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

     */
    @NullUnmarked
    public class ListenableFutureTaskTest extends TestCase {
    
      private ExecutorService exec;
    
      protected final CountDownLatch runLatch = new CountDownLatch(1);
      protected final CountDownLatch taskLatch = new CountDownLatch(1);
      protected final CountDownLatch listenerLatch = new CountDownLatch(1);
    
      protected volatile boolean throwException = false;
    
      protected final ListenableFutureTask<Integer> task =
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Ordinary tests of successful method execution
      // ----------------------------------------------------------------
    
      public void testAwait_countDownLatch() {
        CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  6. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Ordinary tests of successful method execution
      // ----------------------------------------------------------------
    
      public void testAwait_countDownLatch() {
        CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  7. fess-crawler/src/test/java/org/codelibs/fess/crawler/CrawlerContextTest.java

         */
        public void test_accessCount_concurrent() throws Exception {
            final int threadCount = 100;
            final int operationsPerThread = 1000;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
    
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
    
            for (int i = 0; i < threadCount; i++) {
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 25.6K bytes
    - Viewed (0)
  8. fess-crawler/src/test/java/org/codelibs/fess/crawler/rule/RuleManagerTest.java

            final ThreadSafeRuleManager threadSafeManager = new ThreadSafeRuleManager();
            final int threadCount = 10;
            final int rulesPerThread = 100;
            final CountDownLatch startLatch = new CountDownLatch(1);
            final CountDownLatch endLatch = new CountDownLatch(threadCount);
    
            for (int i = 0; i < threadCount; i++) {
                final int threadId = i;
                new Thread(new Runnable() {
                    @Override
    Registered: Sun Sep 21 03:50:09 UTC 2025
    - Last Modified: Sat Sep 06 04:15:37 UTC 2025
    - 23.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/smb1/BufferCacheSecurityTest.java

            // Given
            int threadCount = 10;
            int opsPerThread = 100;
            ExecutorService executor = Executors.newFixedThreadPool(threadCount);
            CountDownLatch startLatch = new CountDownLatch(1);
            CountDownLatch endLatch = new CountDownLatch(threadCount);
            AtomicInteger successCount = new AtomicInteger(0);
            List<Exception> exceptions = new ArrayList<>();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 9.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

      private final ExecutorService exec;
      private final ListenableFuture<?> future;
      private final CountDownLatch latch;
    
      public ListenableFutureTester(ListenableFuture<?> future) {
        this.exec = newCachedThreadPool();
        this.future = checkNotNull(future);
        this.latch = new CountDownLatch(1);
      }
    
      public void setUp() {
        future.addListener(
            new Runnable() {
              @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
Back to top