Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for launch (0.16 sec)

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

        // thread because the task will block on the task latch after unblocking
        // the run latch.
        exec.execute(task);
        runLatch.await();
        assertEquals(1, listenerLatch.getCount());
        assertFalse(task.isDone());
        assertFalse(task.isCancelled());
    
        // Finish the task by unblocking the task latch.  Then wait for the
        // listener to be called by blocking on the listener latch.
        taskLatch.countDown();
    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)
  2. guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

        return new CheckedCallable<String>() {
          @Override
          protected String realCall() {
            try {
              latch.await();
            } catch (InterruptedException quittingTime) {
            }
            return TEST_STRING;
          }
        };
      }
    
      public Runnable awaiter(final CountDownLatch latch) {
        return new CheckedRunnable() {
    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)
  3. guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

      }
    
      private static class NoOpThreadedService extends AbstractExecutionThreadService {
        final CountDownLatch latch = new CountDownLatch(1);
    
        @Override
        protected void run() throws Exception {
          latch.await();
        }
    
        @Override
        protected void triggerShutdown() {
          latch.countDown();
        }
      }
    
      private static class StartFailingService extends AbstractService {
        @Override
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Hashing.java

       * <p>Fingerprint2011() is a form of Murmur2 on strings up to 32 bytes and a form of CityHash for
       * longer strings. It could have been one or the other throughout. The main advantage of the
       * combination is that CityHash has a bunch of special cases for short strings that don't need to
       * be replicated here. The result will never be 0 or 1.
       *
       * <p>This function is best understood as a <a
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 09 00:37:15 GMT 2024
    - 29.2K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

     *
     * <p>Here's an example that tests a {@code finalize} method:
     *
     * <pre>{@code
     * final CountDownLatch latch = new CountDownLatch(1);
     * Object x = new MyClass() {
     *   ...
     *   protected void finalize() { latch.countDown(); ... }
     * };
     * x = null;  // Hint to the JIT that x is stack-unreachable
     * GcFinalization.await(latch);
     * }</pre>
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java

        final CountDownLatch latch = new CountDownLatch(1);
        final SettableFuture<?> future = SettableFuture.create();
        final Executor delegate =
            new Executor() {
              @Override
              public void execute(Runnable task) {
                if (future.set(null)) {
                  awaitUninterruptibly(latch);
                }
                throw new RejectedExecutionException();
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 11.4K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java

      public Callable<String> latchAwaitingStringTask(final CountDownLatch latch) {
        return new CheckedCallable<String>() {
          protected String realCall() {
            try {
              latch.await();
            } catch (InterruptedException quittingTime) {
            }
            return TEST_STRING;
          }
        };
      }
    
      public Runnable awaiter(final CountDownLatch latch) {
        return new CheckedRunnable() {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 37.2K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/AbstractServiceTest.java

      }
    
      private static class NoOpThreadedService extends AbstractExecutionThreadService {
        final CountDownLatch latch = new CountDownLatch(1);
    
        @Override
        protected void run() throws Exception {
          latch.await();
        }
    
        @Override
        protected void triggerShutdown() {
          latch.countDown();
        }
      }
    
      private static class StartFailingService extends AbstractService {
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 29.3K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        assertWithMessage("Nothing should be logged")
            .that(aggregateFutureLogHandler.getStoredLogRecords())
            .isEmpty();
    
        // Not even if there are a bunch of failures.
        assertEquals(
            newArrayList(null, null, null),
            getDone(
                successfulAsList(
                    immediateFailedFuture(new MyException()),
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
  10. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

    public abstract class AbstractListenableFutureTest extends TestCase {
    
      protected CountDownLatch latch;
      protected ListenableFuture<Boolean> future;
    
      @Override
      protected void setUp() throws Exception {
    
        // Create a latch and a future that waits on the latch.
        latch = new CountDownLatch(1);
        future = createListenableFuture(Boolean.TRUE, null, latch);
      }
    
      @Override
      protected void tearDown() throws Exception {
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
Back to top