Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 33 for launch (0.18 sec)

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

      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
              public void run() {
                latch.countDown();
              }
            },
    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)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

      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
              public void run() {
                latch.countDown();
              }
            },
    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)
  3. android/guava-tests/test/com/google/common/util/concurrent/AbstractScheduledServiceTest.java

              public void failed(State from, Throwable failure) {
                assertEquals(State.RUNNING, from);
                assertEquals(error, failure);
                latch.countDown();
              }
            },
            directExecutor());
        service.startAsync();
        latch.await();
    
        assertEquals(0, service.numberOfTimesRunCalled.get());
        assertEquals(Service.State.FAILED, service.state());
      }
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/ServiceManagerTest.java

        final int index;
        final CountDownLatch latch = new CountDownLatch(1);
    
        SnappyShutdownService(int index) {
          this.index = index;
        }
    
        @Override
        protected void run() throws Exception {
          latch.await();
        }
    
        @Override
        protected void triggerShutdown() {
          latch.countDown();
        }
    
        @Override
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 02 17:20:27 GMT 2023
    - 23.2K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java

        private final CountDownLatch latch = new CountDownLatch(1);
        private final String name;
    
        TestCloseable(String name) {
          this.name = name;
        }
    
        @Override
        public void close() throws IOException {
          latch.countDown();
        }
    
        boolean awaitClosed() {
          return awaitUninterruptibly(latch, 10, SECONDS);
        }
    
        boolean stillOpen() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:15:24 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  6. 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 Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 17:40:56 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  7. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/PreconditionsTest.java

      }
    
      @J2ktIncompatible
      @GwtIncompatible // NullPointerTester
      public void testNullPointers() {
        /*
         * Don't bother testing: Preconditions defines a bunch of methods that accept a template (or
         * even entire message) that simultaneously:
         *
         * - _shouldn't_ be null, so we don't annotate it with @Nullable
         *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 19.8K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

        assertEquals("a", notification.getValue());
        assertEquals(1, cache.size());
        assertEquals("b", cache.getUnchecked("b"));
      }
    
      // "Basher tests", where we throw a bunch of stuff at a LoadingCache and check basic invariants.
    
      /**
       * This is a less carefully-controlled version of {@link #testRemovalNotification_clear} - this is
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 03 20:10:02 GMT 2023
    - 25.5K bytes
    - Viewed (0)
  10. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Tue Feb 20 17:00:05 GMT 2024
    - 144.5K bytes
    - Viewed (0)
Back to top