Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 80 for Dispatcher (0.14 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/publicsuffix/PublicSuffixListGenerator.kt

      }
    
      private suspend fun updateLocalFile() =
        withContext(Dispatchers.IO) {
          client.newCall(request).executeAsync().use { response ->
            fileSystem.sink(publicSuffixListDotDat).buffer().use { sink ->
              sink.writeAll(response.body.source())
            }
          }
        }
    
      private suspend fun readImportResults(): ImportResults =
        withContext(Dispatchers.IO) {
          val sortedRules: SortedSet<ByteString> = TreeSet()
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Aug 06 05:33:11 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Call.kt

       */
      @Throws(IOException::class)
      fun execute(): Response
    
      /**
       * Schedules the request to be executed at some point in the future.
       *
       * The [dispatcher][OkHttpClient.dispatcher] defines when the request will run: usually
       * immediately unless there are several other requests currently being executed.
       *
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 6.8K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/TestTls13Request.kt

        .build()
    
    private fun testClient(
      urls: List<String>,
      client: OkHttpClient,
    ) {
      try {
        for (url in urls) {
          sendRequest(client, url)
        }
      } finally {
        client.dispatcher.executorService.shutdownNow()
        client.connectionPool.evictAll()
      }
    }
    
    private fun buildClient(vararg specs: ConnectionSpec): OkHttpClient =
      OkHttpClient
        .Builder()
        .connectionSpecs(listOf(*specs))
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Thu May 22 14:39:30 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  4. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt

            http2Only = true,
            workingOnly = true,
            getOnly = true,
          )
        runBatch(dnsProviders, names)
      } finally {
        bootstrapClient.connectionPool.evictAll()
        bootstrapClient.dispatcher.executorService.shutdownNow()
        bootstrapClient.cache?.close()
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.2K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/AutobahnTester.kt

        try {
          val count = getTestCount()
          println("Test count: $count")
          for (number in 1..count) {
            runTest(number, count)
          }
          updateReports()
        } finally {
          client.dispatcher.executorService.shutdown()
        }
      }
    
      private fun runTest(
        number: Long,
        count: Long,
      ) {
        val latch = CountDownLatch(1)
        val startNanos = AtomicLong()
        newWebSocket(
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  6. okhttp/api/android/okhttp.api

    	public fun connectionAcquired (Lokhttp3/Call;Lokhttp3/Connection;)V
    	public fun connectionReleased (Lokhttp3/Call;Lokhttp3/Connection;)V
    	public fun dispatcherQueueEnd (Lokhttp3/Call;Lokhttp3/Dispatcher;)V
    	public fun dispatcherQueueStart (Lokhttp3/Call;Lokhttp3/Dispatcher;)V
    	public fun dnsEnd (Lokhttp3/Call;Ljava/lang/String;Ljava/util/List;)V
    	public fun dnsStart (Lokhttp3/Call;Ljava/lang/String;)V
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.3K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ThreadInterruptTest.kt

              call: Call,
              response: Response,
            ) {
            }
          },
        )
    
        // This should fail the Call, but not cause an unhandled Exception bubbling up
        client.dispatcher.executorService.shutdownNow()
    
        val exception = callFailure.get(5, TimeUnit.SECONDS)
        assertThat(exception.message)
          .isNotNull()
          .startsWith("canceled due to")
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 18:33:48 UTC 2025
    - 6.4K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt

        addInterceptor(network) { chain: Interceptor.Chain? -> throw boom }
        val executor = ExceptionCatchingExecutor()
        client =
          client
            .newBuilder()
            .dispatcher(Dispatcher(executor))
            .build()
        val request =
          Request
            .Builder()
            .url(server.url("/"))
            .build()
        val call = client.newCall(request)
        call.enqueue(callback)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 16:11:23 UTC 2025
    - 28.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

            sendTestRequest(twitterRequest)
            Thread.sleep(1000)
            sendTestRequest(googleRequest)
            Thread.sleep(2000)
          }
        } finally {
          client.connectionPool.evictAll()
          client.dispatcher.executorService.shutdownNow()
    
          if (launch == CommandLine) {
            process?.destroyForcibly()
          }
        }
      }
    
      private fun sendTestRequest(request: Request) {
        try {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 10.9K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt

            )
    
          return mapOf(
            Boolean::class.java to false,
            Call::class.java to FailingCall(),
            Connection::class.java to factory.newConnection(pool, route),
            Dispatcher::class.java to Dispatcher(),
            Handshake::class.java to handshake,
            HttpUrl::class.java to url,
            IOException::class.java to IOException("boom"),
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 70.5K bytes
    - Viewed (0)
Back to top