- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 2,167 for latch (0.03 sec)
-
okhttp/src/test/java/okhttp3/AutobahnTester.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
try { Thread.sleep(1000); } catch (InterruptedException ignore) {} deferred.resolve(new SuggestResponse("", 0, Collections.emptyList(), 0, null)); }); th.start(); final CountDownLatch latch = new CountDownLatch(1); deferred.promise().then(response -> latch.countDown()); assertTrue(latch.await(10, TimeUnit.SECONDS)); } @Test
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 4.8K bytes - Viewed (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 {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/ProcessHelper.java
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:20:39 UTC 2024 - 6.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
private final CountDownLatch latch; public ListenableFutureTester(ListenableFuture<?> future) { this.exec = Executors.newCachedThreadPool(); this.future = checkNotNull(future); this.latch = new CountDownLatch(1); } public void setUp() { future.addListener( new Runnable() { @Override public void run() { latch.countDown(); } },
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.3K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
do { System.runFinalization(); if (latch.getCount() == 0) { return; } System.gc(); try { if (latch.await(1L, SECONDS)) { return; } } catch (InterruptedException ie) { throw new RuntimeException("Unexpected interrupt while waiting for latch", ie); } } while (System.nanoTime() - deadline < 0);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:26:48 UTC 2024 - 11.6K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
final CountDownLatch latch = new CountDownLatch(1); Object unused = new Object() { @SuppressWarnings({"removal", "Finalize"}) // b/260137033 @Override protected void finalize() { latch.countDown(); } }; unused = null; // Hint to the JIT that unused is unreachable GcFinalization.await(latch); assertEquals(0, latch.getCount()); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/eventbus/DispatcherTest.java
latch.countDown(); } }) .start(); Uninterruptibles.awaitUninterruptibly(latch); // See Dispatcher.LegacyAsyncDispatcher for an explanation of why there aren't really any // useful testable guarantees about the behavior of that dispatcher in a multithreaded
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
build-logic/cleanup/src/main/java/gradlebuild/cleanup/services/KillLeakingJavaProcesses.java
CountDownLatch latch = new CountDownLatch(2); ByteArrayOutputStream stdout = connectStream(process.getInputStream(), latch); ByteArrayOutputStream stderr = connectStream(process.getErrorStream(), latch); process.waitFor(1, TimeUnit.MINUTES); latch.await(1, TimeUnit.MINUTES);
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Mon Aug 19 15:07:24 UTC 2024 - 11.6K bytes - Viewed (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()
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Feb 09 22:57:07 UTC 2022 - 8.2K bytes - Viewed (0)