Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for countdown (0.06 sec)

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

              latch2.countDown()
            }
          }
        val request2Listener: EventListener =
          object : EventListener() {
            override fun connectStart(
              call: Call,
              inetSocketAddress: InetSocketAddress,
              proxy: Proxy,
            ) {
              // Let request1 proceed to make a connection.
              latch1.countDown()
              try {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.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. 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)
  4. okhttp/src/test/java/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()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/cache/CacheBuilderTest.java

                    computationStarted.countDown();
                    cache.getUnchecked("b");
                    computationComplete.countDown();
                  }
                })
            .start();
    
        // wait for the computingEntry to be created
        computationStarted.await();
        cache.invalidateAll();
        // let the computation proceed
        computingLatch.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)
  6. 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)
  7. guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java

          arguments.add(Duration.ofMillis(timeout.millis));
        }
        try {
          Object result;
          doingCallLatch.countDown();
          try {
            result = method.invoke(monitor, arguments.toArray());
          } finally {
            callCompletedLatch.countDown();
          }
          if (result == null) {
            return Outcome.SUCCESS;
          } else if ((Boolean) result) {
            return Outcome.SUCCESS;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:18:12 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

        for (int i = 0; i < SIZE; i++) {
          aa.set(i, (double) COUNTDOWN);
        }
        Counter c1 = new Counter(aa);
        Counter c2 = new Counter(aa);
        Thread t1 = newStartedThread(c1);
        Thread t2 = newStartedThread(c2);
        awaitTermination(t1);
        awaitTermination(t2);
        assertEquals(SIZE * COUNTDOWN, c1.counts + c2.counts);
      }
    
      /** a deserialized serialized array holds same values */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 02:42:09 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        val waiting = CountDownLatch(1)
        client =
          client.newBuilder()
            .addInterceptor(
              Interceptor { chain: Interceptor.Chain? ->
                try {
                  ready.countDown()
                  waiting.await()
                } catch (e: InterruptedException) {
                  throw AssertionError()
                }
                throw IOException()
              },
            )
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  10. 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)
Back to top