- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 2,412 for latch (0.02 seconds)
-
src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
final CountDownLatch latch = new CountDownLatch(3); deferred.promise().error(error -> { callbackCount.incrementAndGet(); latch.countDown(); }).error(error -> { callbackCount.incrementAndGet(); latch.countDown(); }).error(error -> { callbackCount.incrementAndGet(); latch.countDown(); });
Created: Fri Apr 17 09:08:13 GMT 2026 - Last Modified: Sun Feb 01 12:48:24 GMT 2026 - 21.1K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
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 public void finalizeReferent() {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) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
public void testAwaitWithNoWait() { Stopwatch stopwatch = Stopwatch.createStarted(); CountDownLatch latch = new CountDownLatch(0); awaitUninterruptibly(latch); assertTrue(awaitUninterruptibly(latch, 0, MILLISECONDS)); assertTrue(awaitUninterruptibly(latch, -42, MILLISECONDS)); assertTrue(awaitUninterruptibly(latch, LONG_DELAY_MS, MILLISECONDS)); assertTimeNotPassed(stopwatch, LONG_DELAY_MS); }
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) -
android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
public abstract class AbstractListenableFutureTest extends TestCase { protected CountDownLatch latch; protected ListenableFuture<Boolean> future; @Override protected void setUp() throws Exception { // Create a latch and a future that waits on the latch. latch = new CountDownLatch(1); future = createListenableFuture(Boolean.TRUE, null, latch); } @Override protected void tearDown() throws Exception {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
// thread because the task will block on the task latch after unblocking // the run latch. exec.execute(task); runLatch.await(); assertEquals(1, listenerLatch.getCount()); assertFalse(task.isDone()); assertFalse(task.isCancelled()); // Finish the task by unblocking the task latch. Then wait for the // listener to be called by blocking on the listener latch. taskLatch.countDown();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) -
android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
queue.enqueue(incrementingEvent(counters, listener, 4)); queue.enqueue(countDownEvent(latch)); assertEquals(0, counters.size()); queue.dispatch(); latch.await(); assertEquals(multiset(listener, 4), counters); } finally { service.shutdown(); } } public void testEnqueueAndDispatch_multithreaded_withThrowingRunnable()
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 8.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java
queue.enqueue(incrementingEvent(counters, listener, 4)); queue.enqueue(countDownEvent(latch)); assertEquals(0, counters.size()); queue.dispatch(); latch.await(); assertEquals(multiset(listener, 4), counters); } finally { service.shutdown(); } } public void testEnqueueAndDispatch_multithreaded_withThrowingRunnable()
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 17:47:10 GMT 2026 - 8.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
public void testAwaitWithNoWait() { Stopwatch stopwatch = Stopwatch.createStarted(); CountDownLatch latch = new CountDownLatch(0); awaitUninterruptibly(latch); assertTrue(awaitUninterruptibly(latch, 0, MILLISECONDS)); assertTrue(awaitUninterruptibly(latch, -42, MILLISECONDS)); assertTrue(awaitUninterruptibly(latch, LONG_DELAY_MS, MILLISECONDS)); assertTimeNotPassed(stopwatch, LONG_DELAY_MS); }
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) -
guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java
public abstract class AbstractListenableFutureTest extends TestCase { protected CountDownLatch latch; protected ListenableFuture<Boolean> future; @Override protected void setUp() throws Exception { // Create a latch and a future that waits on the latch. latch = new CountDownLatch(1); future = createListenableFuture(Boolean.TRUE, null, latch); } @Override protected void tearDown() throws Exception {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-testlib/src/com/google/common/testing/GcFinalization.java
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 public void finalizeReferent() {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)