Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 103 for CountDown (0.35 seconds)

  1. android/guava-tests/test/com/google/common/util/concurrent/ListenableFutureTester.java

        this.exec = newCachedThreadPool();
        this.future = checkNotNull(future);
        this.latch = new CountDownLatch(1);
      }
    
      public void setUp() {
        future.addListener(latch::countDown, exec);
    
        assertEquals(1, latch.getCount());
        assertFalse(future.isDone());
        assertFalse(future.isCancelled());
      }
    
      public void tearDown() {
        exec.shutdown();
      }
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 22:45:21 GMT 2026
    - 3.3K bytes
    - Click Count (0)
  2. android/guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        return new ListenerCallQueue.Event<Object>() {
          @Override
          public void call(Object listener) {
            latch.countDown();
          }
    
          @Override
          public String toString() {
            return "countDown";
          }
        };
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/util/concurrent/ListenerCallQueueTest.java

        return new ListenerCallQueue.Event<Object>() {
          @Override
          public void call(Object listener) {
            latch.countDown();
          }
    
          @Override
          public String toString() {
            return "countDown";
          }
        };
      }
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 8.4K bytes
    - Click Count (0)
  4. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

     *
     * <p>Here's an example that tests a {@code finalize} method:
     *
     * {@snippet :
     * 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);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:19:19 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  5. guava-testlib/src/com/google/common/testing/GcFinalization.java

     *
     * <p>Here's an example that tests a {@code finalize} method:
     *
     * {@snippet :
     * 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);
     * }
     *
     * <p>Here's an example that uses a user-defined finalization predicate:
     *
     * {@snippet :
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 20:19:19 GMT 2026
    - 12.3K bytes
    - Click Count (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

              response: Response,
            ) {
              bodies.add(response.body.string())
              latch.countDown()
            }
    
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              errors.add(e)
              latch.countDown()
            }
          }
        client.newCall(Request.Builder().url(server.url("/")).build()).enqueue(
          callback,
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 67.5K bytes
    - Click Count (0)
  7. okhttp/src/jvmTest/kotlin/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()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Jun 18 12:28:21 GMT 2025
    - 10.6K bytes
    - Click Count (0)
  8. src/test/java/org/codelibs/fess/rank/fusion/RankFusionProcessorConcurrencyTest.java

                                Thread.currentThread().interrupt();
                            } finally {
                                endLatch.countDown();
                            }
                        });
                    }
    
                    startLatch.countDown(); // Start all threads simultaneously
                    assertTrue("Concurrent registration timed out", endLatch.await(10, TimeUnit.SECONDS));
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sun Jan 11 08:43:05 GMT 2026
    - 13.5K bytes
    - Click Count (0)
  9. 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();
    
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 91K bytes
    - Click Count (0)
  10. okhttp/src/jvmTest/kotlin/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()
            }
          },
        )
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 4.6K bytes
    - Click Count (0)
Back to Top