- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 84 for CountDownLatch (0.28 sec)
-
okhttp/src/test/java/okhttp3/AutobahnTester.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import java.util.concurrent.CountDownLatch import java.util.concurrent.TimeUnit import java.util.concurrent.atomic.AtomicLong import java.util.concurrent.atomic.AtomicReference import okhttp3.internal.USER_AGENT import okio.ByteString /**
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 4.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
Executor exec = Executors.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();
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/src/com/google/common/util/concurrent/testing/MockFutureListener.java
public MockFutureListener(ListenableFuture<?> future) { this.countDownLatch = new CountDownLatch(1); this.future = future; future.addListener(this, directExecutor()); } @Override public void run() { countDownLatch.countDown(); } /** * Verify that the listener completes in a reasonable amount of time, and Asserts that the future * returns the expected data. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 18:12:42 UTC 2023 - 3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt
dns["san.com"] = Dns.SYSTEM.lookup(server.hostName).subList(0, 1) val sanUrl = url.newBuilder().host("san.com").build() val latch1 = CountDownLatch(1) val latch2 = CountDownLatch(1) val latch3 = CountDownLatch(1) val latch4 = CountDownLatch(1) val listener1: EventListener = object : EventListener() { override fun connectStart( call: Call,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 18.7K bytes - Viewed (0) -
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/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java
} 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 public void test_doneAfterResolve() throws Exception {
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
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) -
guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java
@GwtIncompatible // blocking wait public void testCancel_interrupted() throws Exception { final AtomicBoolean interruptedExceptionThrown = new AtomicBoolean(); final CountDownLatch enterLatch = new CountDownLatch(1); final CountDownLatch exitLatch = new CountDownLatch(1); final TrustedListenableFutureTask<Integer> task = TrustedListenableFutureTask.create( new Callable<Integer>() { @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 15:41:36 UTC 2024 - 7.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java
// transition to DONE public void testInterruptThrows() throws Exception { final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1); InterruptibleTask<@Nullable Void> task = new InterruptibleTask<@Nullable Void>() { @Override @Nullable Void runInterruptibly() throws Exception { BrokenChannel bc = new BrokenChannel();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 6.6K bytes - Viewed (0) -
compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListenerTest.java
class ConsoleMavenTransferListenerTest { private CountDownLatch startLatch; private CountDownLatch endLatch; @Test void testTransferProgressedWithPrintResourceNames() throws Exception { int size = 1000; ExecutorService service = Executors.newFixedThreadPool(size * 2); startLatch = new CountDownLatch(size); endLatch = new CountDownLatch(size);
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 5K bytes - Viewed (0)