Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for countdown (0.12 sec)

  1. 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;
                }
              });
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/AbstractExecutionThreadServiceTest.java

        service.expectedShutdownState = Service.State.RUNNING;
    
        service.startAsync().awaitRunning();
        assertTrue(service.startUpCalled);
        assertEquals(Service.State.RUNNING, service.state());
    
        exitRun.countDown(); // the service will exit voluntarily
        executionThread.join();
    
        assertTrue(service.shutDownCalled);
        assertEquals(Service.State.TERMINATED, service.state());
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. 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) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/helper/ProcessHelper.java

                    } catch (final Exception e) {
                        logger.warn("Could not close a process input stream.", e);
                    } finally {
                        latch.countDown();
                    }
                }, "ProcessCloser-input-" + sessionId).start();
                new Thread(() -> {
                    try {
                        CloseableUtil.closeQuietly(process.getErrorStream());
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 11 21:20:39 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. 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;
              }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

              }
            };
        Thread thread1 = new Thread(execute);
        Thread thread2 = new Thread(execute);
        thread1.start();
        thread2.start();
        assertEquals(0, runCalled.get());
        okayToRun.countDown();
        thread1.join();
        thread2.join();
        assertEquals(1, runCalled.get());
      }
    
      public void testAddAfterRun() throws Exception {
        // Run the previous test
        testRunOnPopulatedList();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. 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:
     *
     * <pre>{@code
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListenerTest.java

                    .setTransferredBytes(bytes)
                    .build();
            startLatch.countDown();
            try {
                listener.transferProgressed(event);
            } catch (TransferCancelledException e) {
            }
            endLatch.countDown();
        }
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5K bytes
    - Viewed (0)
  9. 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;
                }
              });
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java

                  new Callable<@Nullable Void>() {
                    @Override
                    public @Nullable Void call() throws Exception {
                      startLatch.countDown();
                      startLatch.await();
                      callable.call();
                      doneLatch.countDown();
                      return null;
                    }
                  });
        }
        doneLatch.await();
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Oct 22 13:49:09 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top