Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for launch (0.72 sec)

  1. 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:
     *
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Thu Feb 22 17:40:56 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

      }
    
      private static class CountDown extends DelayedActionRunnable {
        private final CountDownLatch latch;
    
        public CountDown(CountDownLatch latch, long tMinus) {
          super(tMinus);
          this.latch = latch;
        }
    
        @Override
        protected void doAction() {
          latch.countDown();
        }
      }
    
      private static class EnableWrites extends DelayedActionRunnable {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 16:06:39 UTC 2024
    - 31.7K bytes
    - Viewed (0)
  3. 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();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 11.4K bytes
    - Viewed (0)
  4. android/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() {
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Jun 10 19:21:11 UTC 2024
    - 37.7K bytes
    - Viewed (0)
  5. 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());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  6. 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());
      }
    
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 22.5K bytes
    - Viewed (0)
  7. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue Apr 09 00:37:15 UTC 2024
    - 32.3K 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 29.3K bytes
    - Viewed (0)
  9. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Wed Sep 06 17:04:31 UTC 2023
    - 29.3K bytes
    - Viewed (0)
  10. 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
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Oct 02 17:20:27 UTC 2023
    - 23.9K bytes
    - Viewed (0)
Back to top