Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 770 for latch (0.02 sec)

  1. src/main/java/org/codelibs/fess/helper/ProcessHelper.java

                        logger.warn("Could not close a process output stream.", e);
                    } finally {
                        latch.countDown();
                    }
                }, "ProcessCloser-output-" + sessionId).start();
    
                try {
                    latch.await(10, TimeUnit.SECONDS);
                } catch (final InterruptedException e) {
                    logger.warn("Interrupted to wait a process.", e);
                }
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Oct 11 21:20:39 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  2. 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();
              }
            },
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

        do {
          System.runFinalization();
          if (latch.getCount() == 0) {
            return;
          }
          System.gc();
          try {
            if (latch.await(1L, SECONDS)) {
              return;
            }
          } catch (InterruptedException ie) {
            throw new RuntimeException("Unexpected interrupt while waiting for latch", ie);
          }
        } while (System.nanoTime() - deadline < 0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        final CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.await(latch);
        assertEquals(0, latch.getCount());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  5. 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();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/Uninterruptibles.java

      /** Invokes {@code latch.}{@link CountDownLatch#await() await()} uninterruptibly. */
      @J2ktIncompatible
      @GwtIncompatible // concurrency
      public static void awaitUninterruptibly(CountDownLatch latch) {
        boolean interrupted = false;
        try {
          while (true) {
            try {
              latch.await();
              return;
            } catch (InterruptedException e) {
              interrupted = true;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:51:36 UTC 2024
    - 19.1K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

                call: Call,
                response: Response,
              ) {
                processResponse(response, hostname, responses, failures)
                latch.countDown()
              }
            },
          )
        }
    
        try {
          latch.await()
        } catch (e: InterruptedException) {
          failures.add(e)
        }
      }
    
      private fun processResponse(
        response: Response,
        hostname: String,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Oct 31 09:27:31 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  8. guava-testlib/src/com/google/common/testing/GcFinalization.java

        do {
          System.runFinalization();
          if (latch.getCount() == 0) {
            return;
          }
          System.gc();
          try {
            if (latch.await(1L, SECONDS)) {
              return;
            }
          } catch (InterruptedException ie) {
            throw new RuntimeException("Unexpected interrupt while waiting for latch", ie);
          }
        } while (System.nanoTime() - deadline < 0);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. compat/maven-embedder/src/main/java/org/apache/maven/cli/transfer/SimplexTransferListener.java

        private void feedConsumer() {
            final ArrayList<Exchange> batch = new ArrayList<>(batchMaxSize);
            try {
                while (true) {
                    batch.clear();
                    if (eventQueue.drainTo(batch, BATCH_MAX_SIZE) == 0) {
                        batch.add(eventQueue.take());
                    }
                    demux(batch);
                }
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  10. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        final CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.await(latch);
        assertEquals(0, latch.getCount());
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
Back to top