Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 23 for awaitPong (0.21 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

        }
      }
    
      /** For testing: sends a ping and waits for a pong. */
      @Throws(InterruptedException::class)
      fun writePingAndAwaitPong() {
        writePing()
        awaitPong()
      }
    
      /** For testing: sends a ping to be awaited with [awaitPong]. */
      @Throws(InterruptedException::class)
      fun writePing() {
        withLock {
          awaitPingsSent++
        }
    
        // 0x4f 0x4b 0x6f 0x6b is "OKok".
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 31.8K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

            throw ConnectionShutdownException()
          }
        }
        connection.writePing()
        connection.shutdown(ErrorCode.PROTOCOL_ERROR)
        assertThat(connection.openStreamCount()).isEqualTo(1)
        connection.awaitPong() // Prevent the peer from exiting prematurely.
    
        // Verify the peer received what was expected.
        val synStream1 = peer.takeFrame()
        assertThat(synStream1.type).isEqualTo(Http2.TYPE_HEADERS)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
  3. guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

              @Override
              protected void finalize() {
                future.set(null);
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.awaitDone(future);
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
      }
    
      public void testAwaitDone_future_cancel() {
        SettableFuture<@Nullable Void> future = SettableFuture.create();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  4. android/guava-testlib/src/com/google/common/testing/GcFinalization.java

       *
       * {@snippet :
       * awaitDone(new FinalizationPredicate() {
       *   public boolean isDone() {
       *     return ref.get() == null;
       *   }
       * });
       * }
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      public static void awaitClear(WeakReference<?> ref) {
        awaitDone(() -> ref.get() == null);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  5. android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java

              @Override
              protected void finalize() {
                future.set(null);
              }
            };
        unused = null; // Hint to the JIT that unused is unreachable
        GcFinalization.awaitDone(future);
        assertTrue(future.isDone());
        assertFalse(future.isCancelled());
      }
    
      public void testAwaitDone_future_cancel() {
        SettableFuture<@Nullable Void> future = SettableFuture.create();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 7.9K bytes
    - Viewed (0)
  6. guava-testlib/src/com/google/common/testing/GcFinalization.java

       *
       * {@snippet :
       * awaitDone(new FinalizationPredicate() {
       *   public boolean isDone() {
       *     return ref.get() == null;
       *   }
       * });
       * }
       *
       * @throws RuntimeException if timed out or interrupted while waiting
       */
      public static void awaitClear(WeakReference<?> ref) {
        awaitDone(() -> ref.get() == null);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

        frq = null;
      }
    
      @Test
      public void testFinalizeReferentCalled() {
        MockReference reference = new MockReference(frq = new FinalizableReferenceQueue());
    
        GcFinalization.awaitDone(() -> reference.finalizeReferentCalled);
      }
    
      static class MockReference extends FinalizableWeakReference<Object> {
    
        volatile boolean finalizeReferentCalled;
    
        MockReference(FinalizableReferenceQueue frq) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/base/FinalizableReferenceQueueTest.java

        frq = null;
      }
    
      @Test
      public void testFinalizeReferentCalled() {
        MockReference reference = new MockReference(frq = new FinalizableReferenceQueue());
    
        GcFinalization.awaitDone(() -> reference.finalizeReferentCalled);
      }
    
      static class MockReference extends FinalizableWeakReference<Object> {
    
        volatile boolean finalizeReferentCalled;
    
        MockReference(FinalizableReferenceQueue frq) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java

        assertTrue(file.exists());
        out.close();
    
        // Make sure that finalize deletes the file
        out = null;
    
        // times out and throws RuntimeException on failure
        GcFinalization.awaitDone(
            new GcFinalization.FinalizationPredicate() {
              @Override
              public boolean isDone() {
                return !file.exists();
              }
            });
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/cache/ReferenceEntry.java

     * </ul>
     *
     * <p>Invalid:
     *
     * <ul>
     *   <li>Expired: time expired (key/value may still be set)
     *   <li>Collected: key/value was partially collected, but not yet cleaned up
     *   <li>Unset: marked as unset, awaiting cleanup or reuse
     * </ul>
     */
    @GwtIncompatible
    interface ReferenceEntry<K, V> {
      /** Returns the value reference from this entry. */
      @Nullable ValueReference<K, V> getValueReference();
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue Feb 11 18:34:30 UTC 2025
    - 3.5K bytes
    - Viewed (0)
Back to top