- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 69 for CountDownLatch (0.09 seconds)
-
android/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) -
android/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) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
public void testRunOnPopulatedList() throws Exception { Executor exec = newCachedThreadPool(); CountDownLatch countDownLatch = new CountDownLatch(3); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); assertEquals(3L, countDownLatch.getCount()); list.execute();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
SettableFuture<String> input = SettableFuture.create(); CountDownLatch inFunction = new CountDownLatch(1); CountDownLatch shouldCompleteFunction = new CountDownLatch(1); CountDownLatch gotException = new CountDownLatch(1); AsyncFunction<String, String> function = unused -> { inFunction.countDown(); try {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 134K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesTest.java
SettableFuture<String> input = SettableFuture.create(); CountDownLatch inFunction = new CountDownLatch(1); CountDownLatch shouldCompleteFunction = new CountDownLatch(1); CountDownLatch gotException = new CountDownLatch(1); AsyncFunction<String, String> function = unused -> { inFunction.countDown(); try {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 134K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/helper/LogNotificationHelperTest.java
int numThreads = 8; int eventsPerThread = 200; ExecutorService executor = Executors.newFixedThreadPool(numThreads); CountDownLatch startLatch = new CountDownLatch(1); CountDownLatch doneLatch = new CountDownLatch(numThreads); AtomicInteger totalDrained = new AtomicInteger(0); for (int t = 0; t < numThreads; t++) { final int threadId = t;Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Mar 26 02:24:08 GMT 2026 - 6.3K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
public void testRunOnPopulatedList() throws Exception { Executor exec = newCachedThreadPool(); CountDownLatch countDownLatch = new CountDownLatch(3); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); list.add(new MockRunnable(countDownLatch), exec); assertEquals(3L, countDownLatch.getCount()); list.execute();
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (0) -
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) -
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)