- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 97 for CountDownLatch (0.07 sec)
-
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) -
src/test/java/jcifs/smb/PreauthIntegrityTest.java
setPrivateField(transport, "smb2", true); setPrivateField(transport, "negotiated", negotiateResponse); int threadCount = 10; CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch doneLatch = new CountDownLatch(threadCount); ExecutorService executor = Executors.newFixedThreadPool(threadCount); // Create test data byte[] testData = new byte[64];
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 10.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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Aug 11 19:31:30 UTC 2025 - 85.7K bytes - Viewed (0) -
src/test/java/jcifs/util/SmbCircuitBreakerTest.java
try { assertEquals(0, cbWithTracking.getActiveRequests(), "Initial active requests should be 0"); CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch holdLatch = new CountDownLatch(1); CountDownLatch completeLatch = new CountDownLatch(1); // Start a long-running operation Thread longRunningThread = new Thread(() -> { try {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 23.2K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 11.5K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 16 17:42:14 UTC 2025 - 20.9K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java
public MockFutureListener(ListenableFuture<?> future) { this.countDownLatch = new CountDownLatch(1); this.future = future; future.addListener(this, directExecutor()); } @Override public void run() { countDownLatch.countDown(); } /** * Verify that the listener completes in a reasonable amount of time, and Asserts that the future * returns the expected data. *
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri May 12 18:12:42 UTC 2023 - 3K bytes - Viewed (0) -
guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
assertTrue(successLatch.await(200, MILLISECONDS)); latch.countDown(); } public void testListenersNotifiedOnError() throws Exception { CountDownLatch successLatch = new CountDownLatch(1); CountDownLatch listenerLatch = new CountDownLatch(1); ExecutorService exec = newCachedThreadPool(); future.addListener(listenerLatch::countDown, exec); new Thread( () -> {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 6.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/CriticalPerformanceTest.java
int threadCount = 20; int operationsPerThread = 100; ExecutorService executor = Executors.newFixedThreadPool(threadCount); CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch endLatch = new CountDownLatch(threadCount); AtomicLong totalTime = new AtomicLong(0); 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 - 15.3K 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/FutureReturnValueIgnored
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 6.3K bytes - Viewed (0)