- Sort Score
- Num 10 results
- Language All
Results 71 - 80 of 103 for CountDown (0.1 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
return newTask.latch } } private class AwaitIdleTask : Task("$okHttpName awaitIdle", cancelable = false) { val latch = CountDownLatch(1) override fun runOnce(): Long { latch.countDown() return -1L } } /** Adds [task] to run in [delayNanos]. Returns true if the coordinator is impacted. */ internal fun scheduleAndDecide( task: Task, delayNanos: Long,Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 7.3K bytes - Click Count (0) -
src/test/java/org/codelibs/curl/io/IOIntegrationTest.java
req.threadPool(pool); // ## Act ## req.execute(response -> { threadName.set(Thread.currentThread().getName()); latch.countDown(); }, e -> { latch.countDown(); }); // ## Assert ## assertTrue("Async execution should complete within 5 seconds", latch.await(5, TimeUnit.SECONDS)); assertNotNull(threadName.get());
Created: Thu Apr 02 15:34:12 GMT 2026 - Last Modified: Sat Mar 21 12:00:34 GMT 2026 - 44.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
public @Nullable Void call() throws InterruptedException { running = true; startLatch.countDown(); stopLatch.await(); running = false; return null; } void waitForStart() throws InterruptedException { startLatch.await(); } void stop() { stopLatch.countDown(); } boolean isRunning() { return running; } }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 13.6K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt
clientListener.assertOpen() clientListener.assertFailure( SocketTimeoutException::class.java, "sent ping but didn't receive pong within 500ms (after 0 successful ping/pongs)", ) latch.countDown() val elapsedUntilFailure = System.nanoTime() - openAtNanos assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilFailure).toDouble()) .isCloseTo(1000.0, 250.0) }
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 35.5K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/util/InputStreamThreadTest.java
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sun Jan 11 08:43:05 GMT 2026 - 12K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/ds/AbstractDataStoreTest.java
}); writerThread.start(); // Give threads a moment to reach the latch Thread.sleep(50); // Release all threads to start simultaneously startLatch.countDown(); // Wait for writer thread to complete writerThread.join(1000); // Wait for all reader threads to complete for (Thread thread : readerThreads) {Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Fri Mar 13 23:01:26 GMT 2026 - 12.8K bytes - Click Count (1) -
android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
Future<?> first = blocked.submit(() -> executor.execute(Runnables.doNothing())); future.get(10, SECONDS); assertThrows(RejectedExecutionException.class, () -> executor.execute(Runnables.doNothing())); latch.countDown(); ExecutionException expected = assertThrows(ExecutionException.class, () -> first.get(10, SECONDS)); assertThat(expected).hasCauseThat().isInstanceOf(RejectedExecutionException.class); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 10.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
started.countDown(); try { return method.invoke(delegate, args); } catch (InvocationTargetException e) { throw e.getCause(); } finally { awaitUninterruptibly(canReturn); returned.countDown(); } }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 63K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java
Thread thread = new Thread() { @Override public void run() { try { cacheRef.get().getUnchecked(3); } finally { doneSignal.countDown(); } } }; thread.setUncaughtExceptionHandler((t, throwable) -> {}); thread.start(); boolean done = doneSignal.await(1, SECONDS); if (!done) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 13.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java
Thread thread = new Thread() { @Override public void run() { try { cacheRef.get().getUnchecked(3); } finally { doneSignal.countDown(); } } }; thread.setUncaughtExceptionHandler((t, throwable) -> {}); thread.start(); boolean done = doneSignal.await(1, SECONDS); if (!done) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Mar 18 18:06:14 GMT 2026 - 13.1K bytes - Click Count (0)