Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 53 for CountDown (0.29 seconds)

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

        for (int i = 0; i < SIZE; i++) {
          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 */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 10.8K bytes
    - Click Count (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt

              latch2.countDown()
            }
          }
        val request2Listener: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
              inetSocketAddress: InetSocketAddress,
              proxy: Proxy,
            ) {
              // Let request1 proceed to make a connection.
              latch1.countDown()
              try {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Jun 19 11:44:16 GMT 2025
    - 19.1K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        abstract void doAction();
      }
    
      private static class CountDown extends DelayedActionRunnable {
        private final CountDownLatch latch;
    
        CountDown(CountDownLatch latch, long tMinus) {
          super(tMinus);
          this.latch = latch;
        }
    
        @Override
        protected void doAction() {
          latch.countDown();
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  4. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        for (int i = 0; i < SIZE; i++) {
          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 */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 14.8K bytes
    - Click Count (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        abstract void doAction();
      }
    
      private static class CountDown extends DelayedActionRunnable {
        private final CountDownLatch latch;
    
        CountDown(CountDownLatch latch, long tMinus) {
          super(tMinus);
          this.latch = latch;
        }
    
        @Override
        protected void doAction() {
          latch.countDown();
        }
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 38.1K bytes
    - Click Count (0)
  6. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

     *
     * <p>Here's an example that tests a {@code finalize} method:
     *
     * {@snippet :
     * final CountDownLatch latch = new CountDownLatch(1);
     * Object x = new MyClass() {
     *   ...
     *   protected void finalize() { latch.countDown(); ... }
     * };
     * x = null; // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:19:19 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  7. guava-testlib/src/com/google/common/testing/GcFinalization.java

     *
     * <p>Here's an example that tests a {@code finalize} method:
     *
     * {@snippet :
     * final CountDownLatch latch = new CountDownLatch(1);
     * Object x = new MyClass() {
     *   ...
     *   protected void finalize() { latch.countDown(); ... }
     * };
     * x = null; // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:19:19 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

              e: IOException,
            ) {
              exceptionRef.set(e)
              latch.countDown()
            }
    
            @Throws(IOException::class)
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.close()
              latch.countDown()
            }
          },
        )
        latch.await()
        assertThat(call.isCanceled()).isTrue()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 10.6K bytes
    - Click Count (0)
  9. src/test/java/org/codelibs/fess/rank/fusion/RankFusionProcessorConcurrencyTest.java

                                Thread.currentThread().interrupt();
                            } finally {
                                endLatch.countDown();
                            }
                        });
                    }
    
                    startLatch.countDown(); // Start all threads simultaneously
                    assertTrue("Concurrent registration timed out", endLatch.await(10, TimeUnit.SECONDS));
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 11 08:43:05 GMT 2026
    - 13.5K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        @Override
        public void run() {
          assertTrue("Listener called before it was expected", expectCall);
          assertFalse("Listener called more than once", wasCalled());
          calledCountDown.countDown();
        }
    
        void expectCall() {
          assertFalse("expectCall is already true", expectCall);
          expectCall = true;
        }
    
        boolean wasCalled() {
          return calledCountDown.getCount() == 0;
        }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Fri Mar 13 13:01:07 GMT 2026
    - 10K bytes
    - Click Count (0)
Back to Top