Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for newCachedThreadPool (0.3 sec)

  1. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

      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(
                () -> {
                  assertThrows(CancellationException.class, future::get);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

      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(
                () -> {
                  assertThrows(CancellationException.class, future::get);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

                  }
                  return 25;
                }
              });
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        exec = Executors.newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/collect/QueuesTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.lang.Long.MAX_VALUE;
    import static java.lang.Thread.currentThread;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  5. 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
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. android/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
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/collect/QueuesTest.java

    import static com.google.common.truth.Truth.assertThat;
    import static java.lang.Long.MAX_VALUE;
    import static java.lang.Thread.currentThread;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.MILLISECONDS;
    import static java.util.concurrent.TimeUnit.NANOSECONDS;
    import static java.util.concurrent.TimeUnit.SECONDS;
    import static org.junit.Assert.assertThrows;
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

                  }
                  return 25;
                }
              });
    
      @Override
      protected void setUp() throws Exception {
        super.setUp();
    
        exec = Executors.newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  9. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

      var platform = PlatformRule()
    
      private lateinit var executorService: ExecutorService
    
      private var serverSocket: ServerSocket? = null
    
      @BeforeEach fun setUp() {
        executorService = Executors.newCachedThreadPool(threadFactory("HandshakeCertificatesTest"))
      }
    
      @AfterEach fun tearDown() {
        executorService.shutdown()
        serverSocket?.closeQuietly()
      }
    
      @Test fun clientAndServer() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  10. regression-test/src/androidTest/java/okhttp/regression/compare/AndroidHttpEngineTest.kt

          .build()
    
      @After
      fun tearDown() {
        engine.shutdown()
        cacheDir.deleteRecursively()
      }
    
      @Test
      fun get() {
        val executor = Executors.newCachedThreadPool()
    
        val completableFuture = execute(engine, executor, "https://google.com/robots.txt")
    
        try {
          val response = completableFuture.get(10, TimeUnit.SECONDS)
    
          assertEquals(200, response.code)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 24 13:19:43 GMT 2024
    - 6.2K bytes
    - Viewed (0)
Back to top