- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 104 for CountDownLatch (0.23 sec)
-
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* period or an interrupt while waiting for the expected event will result in a {@link * RuntimeException}. * * <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);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 11.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheLoadingTest.java
CountDownLatch computeSignal = new CountDownLatch(1); // tells the main thread when computation is pending CountDownLatch secondSignal = new CountDownLatch(1); // tells the main thread when the second get has started CountDownLatch thirdSignal = new CountDownLatch(1); // tells the main thread when the third get has started CountDownLatch fourthSignal = new CountDownLatch(1);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 91.1K bytes - Viewed (0) -
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: Sat Dec 20 11:21:39 UTC 2025 - Last Modified: Sat Sep 06 04:15:37 UTC 2025 - 23.8K bytes - Viewed (0) -
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 Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 3.3K bytes - Viewed (0) -
impl/maven-cli/src/test/java/org/apache/maven/cling/transfer/ConsoleMavenTransferListenerTest.java
private CountDownLatch startLatch; private CountDownLatch endLatch; @Test void testTransferProgressedWithPrintResourceNames() throws Exception { int size = 1000; ExecutorService service = Executors.newFixedThreadPool(size * 2); try { startLatch = new CountDownLatch(size); endLatch = new CountDownLatch(size);Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Fri Mar 21 04:56:21 UTC 2025 - 5.6K bytes - Viewed (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
* period or an interrupt while waiting for the expected event will result in a {@link * RuntimeException}. * * <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);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 11.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java
CountDownLatch computeSignal = new CountDownLatch(1); // tells the main thread when computation is pending CountDownLatch secondSignal = new CountDownLatch(1); // tells the main thread when the second get has started CountDownLatch thirdSignal = new CountDownLatch(1); // tells the main thread when the third get has started CountDownLatch fourthSignal = new CountDownLatch(1);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 30 22:03:28 UTC 2025 - 91.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java
waitUntilClosed(closingFuture); futureCancelled.countDown(); } private <V> ValueAndCloser<V> finishToValueAndCloser(ClosingFuture<V> closingFuture) { CountDownLatch valueAndCloserSet = new CountDownLatch(1); closingFuture.finishToValueAndCloser( new ValueAndCloserConsumer<V>() { @Override public void accept(ValueAndCloser<V> valueAndCloser) {
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 5.7K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/FakeTickerTest.java
throws Exception { ExecutorService executorService = newFixedThreadPool(numberOfThreads); CountDownLatch startLatch = new CountDownLatch(numberOfThreads); CountDownLatch doneLatch = new CountDownLatch(numberOfThreads); for (int i = numberOfThreads; i > 0; i--) { @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnoredRegistered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 6.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ArbitraryInstances.java
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentNavigableMap; import java.util.concurrent.ConcurrentSkipListMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadFactory;
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Sep 23 17:50:58 UTC 2025 - 20.9K bytes - Viewed (0)