Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 104 for CountDownLatch (0.35 sec)

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

      }
    
      public void testNull() throws Exception {
        new NullPointerTester()
            .setDefault(CountDownLatch.class, new CountDownLatch(0))
            .setDefault(Semaphore.class, new Semaphore(999))
            .testAllPublicStaticMethods(Uninterruptibles.class);
      }
    
      // IncrementableCountDownLatch.await() tests
    
      // CountDownLatch.await() tests
    
      // Condition.await() tests
      public void testConditionAwaitTimeoutExceeded() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Feb 09 22:57:07 GMT 2022
    - 31.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/eventbus/DispatcherTest.java

                )
            .inOrder();
      }
    
      public void testLegacyAsyncDispatcher() {
        dispatcher = Dispatcher.legacyAsync();
    
        final CyclicBarrier barrier = new CyclicBarrier(2);
        final CountDownLatch latch = new CountDownLatch(2);
    
        new Thread(
                new Runnable() {
                  @Override
                  public void run() {
                    try {
                      barrier.await();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 27 15:41:25 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

     */
    public class ListenableFutureTaskTest extends TestCase {
    
      private ExecutorService exec;
    
      protected final CountDownLatch runLatch = new CountDownLatch(1);
      protected final CountDownLatch taskLatch = new CountDownLatch(1);
      protected final CountDownLatch listenerLatch = new CountDownLatch(1);
    
      protected volatile boolean throwException = false;
    
      protected final ListenableFutureTask<Integer> task =
    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. guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

      public MockFutureListener(ListenableFuture<?> future) {
        this.countDownLatch = new CountDownLatch(1);
        this.future = future;
    
        future.addListener(this, directExecutor());
      }
    
      @Override
      public void run() {
        countDownLatch.countDown();
      }
    
      /**
       * Verify that the listener completes in a reasonable amount of time, and Asserts that the future
       * returns the expected data.
       *
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/util/concurrent/JdkFutureAdaptersTest.java

        assertSame(listenableFuture, listenInPoolThread(listenableFuture));
      }
    
      private static class SingleCallListener implements Runnable {
    
        private boolean expectCall = false;
        private final CountDownLatch calledCountDown = new CountDownLatch(1);
    
        @Override
        public void run() {
          assertTrue("Listener called before it was expected", expectCall);
          assertFalse("Listener called more than once", wasCalled());
    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)
  6. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

      }
    
      public void testAsMapDuringLoading() throws InterruptedException, ExecutionException {
        final CountDownLatch getStartedSignal = new CountDownLatch(2);
        final CountDownLatch letGetFinishSignal = new CountDownLatch(1);
        final CountDownLatch getFinishedSignal = new CountDownLatch(2);
        final String getKey = "get";
        final String refreshKey = "refresh";
        final String suffix = "Suffix";
    
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                .build(computingFunction);
    
        // seed the map, so its segment's count > 0
        cache.getUnchecked("a");
        shouldWait.set(true);
    
        final CountDownLatch computationStarted = new CountDownLatch(1);
        final CountDownLatch computationComplete = new CountDownLatch(1);
        new Thread(
                new Runnable() {
                  @Override
                  public void run() {
                    computationStarted.countDown();
    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)
  8. guava-tests/test/com/google/common/cache/CacheLoadingTest.java

      }
    
      public void testAsMapDuringLoading() throws InterruptedException, ExecutionException {
        final CountDownLatch getStartedSignal = new CountDownLatch(2);
        final CountDownLatch letGetFinishSignal = new CountDownLatch(1);
        final CountDownLatch getFinishedSignal = new CountDownLatch(2);
        final String getKey = "get";
        final String refreshKey = "refresh";
        final String suffix = "Suffix";
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/util/concurrent/FuturesTest.java

        SettableFuture<String> input = SettableFuture.create();
        final CountDownLatch inFunction = new CountDownLatch(1);
        final CountDownLatch shouldCompleteFunction = new CountDownLatch(1);
        final CountDownLatch gotException = new CountDownLatch(1);
        AsyncFunction<String, String> function =
            new AsyncFunction<String, String>() {
              @Override
    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)
  10. guava-testlib/test/com/google/common/testing/FakeTickerTest.java

          throws Exception {
        ExecutorService executorService = Executors.newFixedThreadPool(numberOfThreads);
        final CountDownLatch startLatch = new CountDownLatch(numberOfThreads);
        final CountDownLatch doneLatch = new CountDownLatch(numberOfThreads);
        for (int i = numberOfThreads; i > 0; i--) {
          @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Feb 06 14:40:46 GMT 2024
    - 6.3K bytes
    - Viewed (0)
Back to top