Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for newCachedThreadPool (0.19 sec)

  1. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

     */
    public class ExecutionListTest extends TestCase {
    
      private final ExecutionList list = new ExecutionList();
    
      public void testRunOnPopulatedList() throws Exception {
        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);
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

    import static com.google.common.util.concurrent.JdkFutureAdapters.listenInPoolThread;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.testing.ClassSanityTester;
    import com.google.common.util.concurrent.FuturesTest.ExecutorSpy;
    import java.util.concurrent.CountDownLatch;
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. android/guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

    import static com.google.common.util.concurrent.JdkFutureAdapters.listenInPoolThread;
    import static com.google.common.util.concurrent.MoreExecutors.directExecutor;
    import static java.util.concurrent.Executors.newCachedThreadPool;
    import static java.util.concurrent.TimeUnit.SECONDS;
    
    import com.google.common.testing.ClassSanityTester;
    import com.google.common.util.concurrent.FuturesTest.ExecutorSpy;
    import java.util.concurrent.CountDownLatch;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 9.7K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. android/guava/src/com/google/common/util/concurrent/SimpleTimeLimiter.java

       * case the call may even time out before the target method is ever invoked.
       *
       * @param executor the ExecutorService that will execute the method calls on the target objects;
       *     for example, a {@link Executors#newCachedThreadPool()}.
       * @since 22.0
       */
      public static SimpleTimeLimiter create(ExecutorService executor) {
        return new SimpleTimeLimiter(executor);
      }
    
      @Override
      public <T> T newProxy(
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jun 27 14:21:11 GMT 2023
    - 9.7K bytes
    - Viewed (0)
Back to top