- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 130 for CountDownLatch (0.08 seconds)
-
guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java
AtomicBoolean interruptedExceptionThrown = new AtomicBoolean(); CountDownLatch enterLatch = new CountDownLatch(1); CountDownLatch exitLatch = new CountDownLatch(1); TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create( () -> { enterLatch.countDown(); try { new CountDownLatch(1).await(); // wait forever throw new AssertionError();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 6.5K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/rank/fusion/RankFusionProcessorConcurrencyTest.java
@Test public void test_concurrentSearcherRegistration() throws Exception { final int numThreads = 10; final int searchersPerThread = 5; final CountDownLatch startLatch = new CountDownLatch(1); final CountDownLatch endLatch = new CountDownLatch(numThreads); final AtomicInteger registeredCount = new AtomicInteger(0); try (RankFusionProcessor processor = new RankFusionProcessor()) {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) -
src/test/java/jcifs/internal/smb2/ServerMessageBlock2ResponseTest.java
void testConcurrentReceived() throws InterruptedException { int threadCount = 10; CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch endLatch = new CountDownLatch(threadCount); for (int i = 0; i < threadCount; i++) { new Thread(() -> { try {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 19.3K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
static final Set<FinalizableReference> references = newConcurrentHashSet(); static void register(Object referent, CountDownLatch latch) { references.add(new FinalizableReference(referent, latch)); } final CountDownLatch latch; FinalizableReference(Object referent, CountDownLatch latch) { super(referent, referenceQueue); this.latch = latch; } @Override
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) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java
// Regression test for a deadlock where a task could be stuck busy waiting for the task to // transition to DONE public void testInterruptThrows() throws Exception { CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); SettableFuture<String> taskResult = SettableFuture.create(); InterruptibleTask<String> task = new InterruptibleTask<String>() { @Override
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 7.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java
// Regression test for a deadlock where a task could be stuck busy waiting for the task to // transition to DONE public void testInterruptThrows() throws Exception { CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); SettableFuture<String> taskResult = SettableFuture.create(); InterruptibleTask<String> task = new InterruptibleTask<String>() { @Override
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 7.2K bytes - Click Count (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( () -> {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Jul 11 18:52:30 GMT 2025 - 6.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
@GwtIncompatible @J2ktIncompatible public class ListenableFutureTaskTest extends TestCase { private ExecutorService exec; private final CountDownLatch runLatch = new CountDownLatch(1); private final CountDownLatch taskLatch = new CountDownLatch(1); private final CountDownLatch listenerLatch = new CountDownLatch(1); private volatile boolean throwException = false; private final ListenableFutureTask<Integer> task =Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.7K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java
} private static class SingleCallListener implements Runnable { private boolean expectCall = false; private final CountDownLatch calledCountDown = new CountDownLatch(1); @Override public void run() { assertTrue("Listener called before it was expected", expectCall); assertFalse("Listener called more than once", wasCalled());Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 10K bytes - Click Count (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];
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 10.5K bytes - Click Count (0)