Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for CountDownLatch (0.21 sec)

  1. okhttp/src/test/java/okhttp3/AutobahnTester.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.util.concurrent.CountDownLatch
    import java.util.concurrent.TimeUnit
    import java.util.concurrent.atomic.AtomicLong
    import java.util.concurrent.atomic.AtomicReference
    import okhttp3.internal.USER_AGENT
    import okio.ByteString
    
    /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java

        Executor exec = Executors.newCachedThreadPool();
        CountDownLatch countDownLatch = new CountDownLatch(3);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        list.add(new MockRunnable(countDownLatch), exec);
        assertEquals(3L, countDownLatch.getCount());
    
        list.execute();
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        dns["san.com"] = Dns.SYSTEM.lookup(server.hostName).subList(0, 1)
        val sanUrl = url.newBuilder().host("san.com").build()
        val latch1 = CountDownLatch(1)
        val latch2 = CountDownLatch(1)
        val latch3 = CountDownLatch(1)
        val latch4 = CountDownLatch(1)
        val listener1: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/suggest/concurrent/DeferredTest.java

                } catch (InterruptedException ignore) {}
                deferred.resolve(new SuggestResponse("", 0, Collections.emptyList(), 0, null));
            });
            th.start();
    
            final CountDownLatch latch = new CountDownLatch(1);
            deferred.promise().then(response -> latch.countDown());
            assertTrue(latch.await(10, TimeUnit.SECONDS));
        }
    
        @Test
        public void test_doneAfterResolve() throws Exception {
    Registered: Fri Nov 08 09:08:12 UTC 2024
    - Last Modified: Thu Feb 22 01:36:54 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

      // Ordinary tests of successful method execution
      // ----------------------------------------------------------------
    
      public void testAwait_countDownLatch() {
        final CountDownLatch latch = new CountDownLatch(1);
        Object unused =
            new Object() {
              @SuppressWarnings({"removal", "Finalize"}) // b/260137033
              @Override
              protected void finalize() {
                latch.countDown();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/util/concurrent/TrustedListenableFutureTaskTest.java

      @GwtIncompatible // blocking wait
      public void testCancel_interrupted() throws Exception {
        final AtomicBoolean interruptedExceptionThrown = new AtomicBoolean();
        final CountDownLatch enterLatch = new CountDownLatch(1);
        final CountDownLatch exitLatch = new CountDownLatch(1);
        final TrustedListenableFutureTask<Integer> task =
            TrustedListenableFutureTask.create(
                new Callable<Integer>() {
                  @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 15:41:36 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/util/concurrent/InterruptibleTaskTest.java

      // transition to DONE
      public void testInterruptThrows() throws Exception {
        final CountDownLatch isInterruptibleRegistered = new CountDownLatch(1);
        InterruptibleTask<@Nullable Void> task =
            new InterruptibleTask<@Nullable Void>() {
              @Override
              @Nullable Void runInterruptibly() throws Exception {
                BrokenChannel bc = new BrokenChannel();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. 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 =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 22:10:29 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  9. compat/maven-embedder/src/test/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListenerTest.java

    class ConsoleMavenTransferListenerTest {
    
        private CountDownLatch startLatch;
        private CountDownLatch endLatch;
    
        @Test
        void testTransferProgressedWithPrintResourceNames() throws Exception {
            int size = 1000;
            ExecutorService service = Executors.newFixedThreadPool(size * 2);
            startLatch = new CountDownLatch(size);
            endLatch = new CountDownLatch(size);
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. 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();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 15:00:32 UTC 2024
    - 24.9K bytes
    - Viewed (0)
Back to top