Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 102 for countDown (0.26 sec)

  1. android/guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

                  successLatch.countDown();
                })
            .start();
    
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
    
        future.cancel(true);
    
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertTrue(successLatch.await(200, MILLISECONDS));
    
        latch.countDown();
      }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      protected final ListenableFutureTask<Integer> task =
          ListenableFutureTask.create(
              new Callable<Integer>() {
                @Override
                public Integer call() throws Exception {
                  runLatch.countDown();
                  taskLatch.await();
                  if (throwException) {
                    throw new IllegalStateException("Fail");
                  }
                  return 25;
                }
              });
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.7K bytes
    - Viewed (0)
  3. guava-testlib/src/com/google/common/util/concurrent/testing/AbstractListenableFutureTest.java

                  successLatch.countDown();
                })
            .start();
    
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
    
        future.cancel(true);
    
        assertTrue(future.isDone());
        assertTrue(future.isCancelled());
    
        assertTrue(successLatch.await(200, MILLISECONDS));
    
        latch.countDown();
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 18:30:30 GMT 2023
    - 6K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

            TrustedListenableFutureTask.create(
                new Callable<Integer>() {
                  @Override
                  public Integer call() throws Exception {
                    enterLatch.countDown();
                    try {
                      new CountDownLatch(1).await(); // wait forever
                      throw new AssertionError();
                    } catch (InterruptedException e) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/AutobahnTester.kt

              reason: String,
            ) {
              webSocket.close(1000, null)
              latch.countDown()
            }
    
            override fun onFailure(
              webSocket: WebSocket,
              t: Throwable,
              response: Response?,
            ) {
              t.printStackTrace(System.out)
              latch.countDown()
            }
          },
        )
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/ListenableFutureTaskTest.java

      protected final ListenableFutureTask<Integer> task =
          ListenableFutureTask.create(
              new Callable<Integer>() {
                @Override
                public Integer call() throws Exception {
                  runLatch.countDown();
                  taskLatch.await();
                  if (throwException) {
                    throw new IllegalStateException("Fail");
                  }
                  return 25;
                }
              });
    
    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)
  7. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

              @Override
              @Nullable Void runInterruptibly() throws Exception {
                BrokenChannel bc = new BrokenChannel();
                bc.doBegin();
                isInterruptibleRegistered.countDown();
                new CountDownLatch(1).await(); // the interrupt will wake us up
                return null;
              }
    
              @Override
              boolean isDone() {
                return false;
              }
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

              e: IOException,
            ) {
              exceptionRef.set(e)
              latch.countDown()
            }
    
            @Throws(IOException::class)
            override fun onResponse(
              call: Call,
              response: Response,
            ) {
              response.close()
              latch.countDown()
            }
          },
        )
        latch.await()
        assertThat(call.isCanceled()).isTrue()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

            TrustedListenableFutureTask.create(
                new Callable<Integer>() {
                  @Override
                  public Integer call() throws Exception {
                    enterLatch.countDown();
                    try {
                      new CountDownLatch(1).await(); // wait forever
                      throw new AssertionError();
                    } catch (InterruptedException e) {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Tue Feb 13 14:28:25 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/cache/CacheLoadingTest.java

            cache.getUnchecked(getKey);
            getFinishedSignal.countDown();
          }
        }.start();
        new Thread() {
          @Override
          public void run() {
            cache.refresh(refreshKey);
            getFinishedSignal.countDown();
          }
        }.start();
    
        // let computation complete
        letGetFinishSignal.countDown();
        getFinishedSignal.await();
        checkNothingLogged();
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 86.2K bytes
    - Viewed (0)
Back to top