Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 70 for CountDown (0.26 sec)

  1. src/main/java/org/codelibs/fess/exec/SuggestCreator.java

                suggestHelper.indexFromDocuments(ret -> {
                    logger.info("Success indexing from documents.");
                    latch.countDown();
                }, t -> {
                    logger.error("Failed to update suggest index.", t);
                    exitCode.set(1);
                    latch.countDown();
                });
    
                try {
                    latch.await();
                } catch (final InterruptedException ignore) {
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Thu Aug 07 03:06:29 UTC 2025
    - 11K bytes
    - Viewed (0)
  2. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

        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());
      }
    
      public void testAwaitDone_future() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsOverHttps.kt

                synchronized(failures) {
                  failures.add(e)
                }
                latch.countDown()
              }
    
              override fun onResponse(
                call: Call,
                response: Response,
              ) {
                processResponse(response, hostname, responses, failures)
                latch.countDown()
              }
            },
          )
        }
    
        try {
          latch.await()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 8.6K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

          return newTask.latch
        }
      }
    
      private class AwaitIdleTask : Task("$okHttpName awaitIdle", cancelable = false) {
        val latch = CountDownLatch(1)
    
        override fun runOnce(): Long {
          latch.countDown()
          return -1L
        }
      }
    
      /** Adds [task] to run in [delayNanos]. Returns true if the coordinator is impacted. */
      internal fun scheduleAndDecide(
        task: Task,
        delayNanos: Long,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 23:28:25 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java

        }
    
        abstract void doAction();
      }
    
      private static class CountDown extends DelayedActionRunnable {
        private final CountDownLatch latch;
    
        CountDown(CountDownLatch latch, long tMinus) {
          super(tMinus);
          this.latch = latch;
        }
    
        @Override
        protected void doAction() {
          latch.countDown();
        }
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 31.7K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt

      fun sendResponse(
        s: String,
        responseSent: CountDownLatch = CountDownLatch(1),
      ) = apply {
        actions += { stream ->
          stream.sink.writeUtf8(s)
          stream.sink.flush()
          responseSent.countDown()
        }
      }
    
      fun exhaustResponse() =
        apply {
          actions += { stream -> stream.sink.close() }
        }
    
      fun sleep(
        duration: Long,
        unit: TimeUnit,
      ) = apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  7. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        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.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri May 12 18:12:42 UTC 2023
    - 3K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        this.latch = new CountDownLatch(1);
      }
    
      public void setUp() {
        future.addListener(
            new Runnable() {
              @Override
              public void run() {
                latch.countDown();
              }
            },
            exec);
    
        assertEquals(1, latch.getCount());
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
      }
    
      public void tearDown() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Fri Jul 11 18:52:30 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketHttpTest.kt

        clientListener.assertOpen()
        clientListener.assertFailure(
          SocketTimeoutException::class.java,
          "sent ping but didn't receive pong within 500ms (after 0 successful ping/pongs)",
        )
        latch.countDown()
        val elapsedUntilFailure = System.nanoTime() - openAtNanos
        assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilFailure).toDouble())
          .isCloseTo(1000.0, 250.0)
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 35.5K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/fess/util/InputStreamThreadTest.java

            List<String> receivedLines = new ArrayList<>();
            Consumer<String> callback = line -> {
                receivedLines.add(line);
                if (receivedLines.size() == 5000) {
                    latch.countDown();
                }
            };
    
            InputStreamThread thread = new InputStreamThread(is, StandardCharsets.UTF_8, 100, callback);
            thread.start();
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Sat Jul 12 07:34:10 UTC 2025
    - 11.7K bytes
    - Viewed (0)
Back to top