Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for execa (0.18 sec)

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

      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);
        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 4.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/ForwardingListenableFuture.java

      protected ForwardingListenableFuture() {}
    
      @Override
      protected abstract ListenableFuture<? extends V> delegate();
    
      @Override
      public void addListener(Runnable listener, Executor exec) {
        delegate().addListener(listener, exec);
      }
    
      // TODO(cpovirk): Use standard Javadoc form for SimpleForwarding* class and constructor
      /**
       * A simplified version of {@link ForwardingListenableFuture} where subclasses can pass in an
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Mar 04 12:23:41 GMT 2022
    - 2.4K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java

        }
    
        @Override
        protected Future<V> delegate() {
          return delegate;
        }
    
        @Override
        public void addListener(Runnable listener, Executor exec) {
          executionList.add(listener, exec);
    
          // When a listener is first added, we run a task that will wait for the delegate to finish,
          // and when it is done will run the listeners.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Dec 14 20:35:03 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        super.setUp();
    
        exec = Executors.newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
      @Override
      protected void tearDown() throws Exception {
        if (exec != null) {
          exec.shutdown();
        }
    
        super.tearDown();
    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)
  5. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

      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);
        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
    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)
  6. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

          else break;
        }
      }
    
      /** Waits out termination of a thread pool or fails doing so. */
      void joinPool(ExecutorService exec) {
        try {
          exec.shutdown();
          assertTrue(
              "ExecutorService did not terminate in a timely manner",
              exec.awaitTermination(2 * LONG_DELAY_MS, MILLISECONDS));
        } catch (SecurityException ok) {
          // Allowed in case test doesn't have privs
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.7K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

            new Thread(() -> latch.countDown()).start();
          }
    
          future.addListener(listenerLatch::countDown, exec);
        }
    
        assertSame(Boolean.TRUE, future.get());
        // Wait for the listener latch to complete.
        listenerLatch.await(500, MILLISECONDS);
    
        exec.shutdown();
        exec.awaitTermination(500, MILLISECONDS);
      }
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

     *
     * @author Sven Mawson
     */
    public class ListenableFutureTester {
    
      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);
      }
    
    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

     *
     * @author Sven Mawson
     */
    public class ListenableFutureTester {
    
      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);
      }
    
    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-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

        super.setUp();
    
        exec = Executors.newCachedThreadPool();
    
        task.addListener(
            new Runnable() {
              @Override
              public void run() {
                listenerLatch.countDown();
              }
            },
            directExecutor());
      }
    
      @Override
      protected void tearDown() throws Exception {
        if (exec != null) {
          exec.shutdown();
        }
    
        super.tearDown();
    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)
Back to top