- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 84 for CountDownLatch (0.08 sec)
-
guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java
private final ExecutorService exec; private final ListenableFuture<?> future; 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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 3.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 = Executors.newCachedThreadPool(); future.addListener(listenerLatch::countDown, exec); new Thread( () -> {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 18:30:30 UTC 2023 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureFinishToValueAndCloserTest.java
waitUntilClosed(closingFuture); futureCancelled.countDown(); } private <V> ValueAndCloser<V> finishToValueAndCloser(ClosingFuture<V> closingFuture) { final CountDownLatch valueAndCloserSet = new CountDownLatch(1); closingFuture.finishToValueAndCloser( new ValueAndCloserConsumer<V>() { @Override public void accept(ValueAndCloser<V> valueAndCloser) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 5.7K bytes - Viewed (0) -
guava/src/com/google/common/util/concurrent/Uninterruptibles.java
// methods is identical, save for method being invoked. /** Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly. */ @J2ktIncompatible @GwtIncompatible // concurrency public static void awaitUninterruptibly(CountDownLatch latch) { boolean interrupted = false; try { while (true) { try { latch.await(); return;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:51:36 UTC 2024 - 19.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/eventbus/DispatcherTest.java
) .inOrder(); } public void testLegacyAsyncDispatcher() { dispatcher = Dispatcher.legacyAsync(); final CyclicBarrier barrier = new CyclicBarrier(2); final CountDownLatch latch = new CountDownLatch(2); new Thread( new Runnable() { @Override public void run() { try { barrier.await();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/eventbus/DispatcherTest.java
) .inOrder(); } public void testLegacyAsyncDispatcher() { dispatcher = Dispatcher.legacyAsync(); final CyclicBarrier barrier = new CyclicBarrier(2); final CountDownLatch latch = new CountDownLatch(2); new Thread( new Runnable() { @Override public void run() { try { barrier.await();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Apr 27 15:41:25 UTC 2022 - 5.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java
*/ 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 4.7K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
// Ordinary tests of successful method execution // ---------------------------------------------------------------- public void testAwait_countDownLatch() { final CountDownLatch latch = new CountDownLatch(1); Object unused = new Object() { @SuppressWarnings({"removal", "Finalize"}) // b/260137033 @Override protected void finalize() { latch.countDown();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 7.9K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/ProcessHelper.java
ist.interrupt(); } catch (final Exception e) { logger.warn("Could not interrupt a thread of an input stream.", e); } final CountDownLatch latch = new CountDownLatch(3); final Process process = jobProcess.getProcess(); new Thread(() -> { try { CloseableUtil.closeQuietly(process.getInputStream());
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Fri Oct 11 21:20:39 UTC 2024 - 6.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
} private static class BlockingCallable implements Callable<@Nullable Void> { private final CountDownLatch startLatch = new CountDownLatch(1); private final CountDownLatch stopLatch = new CountDownLatch(1); private volatile boolean running = false; @Override public @Nullable Void call() throws InterruptedException { running = true;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0)