- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for QThread (0.16 sec)
-
okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt
@Throws(InterruptedException::class, TimeoutException::class) private fun waitForConnectionShutdown(connection: RealConnection?) { if (connection!!.isHealthy(false)) { Thread.sleep(100L) } if (connection.isHealthy(false)) { Thread.sleep(2000L) } if (connection.isHealthy(false)) { throw TimeoutException("connection didn't shutdown within timeout") } } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 22:09:35 GMT 2024 - 75.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/EventListenerTest.kt
} override fun writeTo(sink: BufferedSink) { try { var i = 0 while (i < contentLength()) { sink.write(chunk!!) sink.flush() Thread.sleep(100) i += chunk.size } } catch (e: IOException) { ioe = e } catch (e: InterruptedException) { throw RuntimeException(e) } } }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 56.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt
* * ## OkHttpClients Should Be Shared * * OkHttp performs best when you create a single `OkHttpClient` instance and reuse it for all of * your HTTP calls. This is because each client holds its own connection pool and thread pools. * Reusing connections and threads reduces latency and saves memory. Conversely, creating a client * for each request wastes resources on idle pools. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:21:33 GMT 2024 - 52K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt
// When the timeout is sent the connection doesn't immediately go unhealthy. assertThat(connection.isHealthy(System.nanoTime())).isTrue() // But if the ping doesn't arrive, the connection goes unhealthy. Thread.sleep(TimeUnit.NANOSECONDS.toMillis(Http2Connection.DEGRADED_PONG_TIMEOUT_NS.toLong())) assertThat(connection.isHealthy(System.nanoTime())).isFalse() // When a pong does arrive, the connection becomes healthy again.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 75.4K bytes - Viewed (0)