Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for backends (0.21 sec)

  1. okcurl/README.md

    OkCurl
    ======
    
    _A curl for the next-generation web._
    
    OkCurl is an OkHttp-backed curl clone which allows you to test OkHttp's HTTP engine (including
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jul 09 21:19:04 GMT 2016
    - 178 bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskLogger.kt

      if (loggingEnabled) {
        startNs = queue.taskRunner.backend.nanoTime()
        log(task, queue, "starting")
      }
    
      var completedNormally = false
      try {
        val result = block()
        completedNormally = true
        return result
      } finally {
        if (loggingEnabled) {
          val elapsedNs = queue.taskRunner.backend.nanoTime() - startNs
          if (completedNormally) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

      /**
       * Results are posted here as they occur. The find job is done when either one plan completes
       * successfully or all plans fail.
       */
      private val connectResults = taskRunner.backend.decorate(LinkedBlockingDeque<ConnectResult>())
    
      override fun find(): RealConnection {
        var firstException: IOException? = null
        try {
          while (tcpConnectsInFlight.isNotEmpty() || routePlanner.hasNext()) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

      internal fun scheduleAndDecide(
        task: Task,
        delayNanos: Long,
        recurrence: Boolean,
      ): Boolean {
        task.initQueue(this)
    
        val now = taskRunner.backend.nanoTime()
        val executeNanoTime = now + delayNanos
    
        // If the task is already scheduled, take the earlier of the two times.
        val existingIndex = futureTasks.indexOf(task)
        if (existingIndex != -1) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

     */
    class TaskRunner(
      val backend: Backend,
      internal val logger: Logger = TaskRunner.logger,
    ) {
      val lock: ReentrantLock = ReentrantLock()
      val condition: Condition = lock.newCondition()
    
      private var nextQueueName = 10000
      private var coordinatorWaiting = false
      private var coordinatorWakeUpAt = 0L
    
      /**
       * When we need a new thread to run tasks, we call [Backend.execute]. A few microseconds later we
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

            isDaemon = true
            uncaughtExceptionHandler = loggingUncaughtExceptionHandler
          }
        }
    
      private val backend = TaskRunner.RealBackend(threadFactory)
      private val taskRunner = TaskRunner(backend)
      private val queue = taskRunner.newQueue()
    
      @AfterEach fun tearDown() {
        backend.shutdown()
      }
    
      @Test fun test() {
        val t1 = System.nanoTime() / 1e6
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  7. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

     * [advanceUntil]. These functions don't return until the task threads are all idle.
     *
     * Task threads release their execution privilege in these ways:
     *
     *  * By yielding in [TaskRunner.Backend.coordinatorWait].
     *  * By yielding in [BlockingQueue.poll].
     *  * By completing.
     */
    class TaskFaker : Closeable {
      @Suppress("NOTHING_TO_INLINE")
      internal inline fun Any.assertThreadHoldsLock() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * imposes both obligations and limits on the client application.
     *
     * ### The response body must be closed.
     *
     * Each response body is backed by a limited resource like a socket (live network responses) or
     * an open file (for cached responses). Failing to close the response body will leak resources and
     * may ultimately cause the application to slow down or crash.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (0)
  9. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/internal/concurrent/TaskRunner$runnable$1;->run()V
    HSPLokhttp3/internal/concurrent/TaskRunner;-><clinit>()V
    HSPLokhttp3/internal/concurrent/TaskRunner;-><init>(Lokhttp3/internal/concurrent/TaskRunner$Backend;Ljava/util/logging/Logger;I)V
    HSPLokhttp3/internal/concurrent/TaskRunner;->access$runTask(Lokhttp3/internal/concurrent/TaskRunner;Lokhttp3/internal/concurrent/Task;)V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        if (isLoom()) {
          val backend = TaskRunner.RealBackend(loomThreadFactory())
          val taskRunner = TaskRunner(backend)
    
          OkHttpClient.Builder()
            .connectionPool(
              buildConnectionPool(
                connectionListener = connectionListener,
                taskRunner = taskRunner,
              ),
            )
            .dispatcher(Dispatcher(backend.executor))
            .taskRunnerInternal(taskRunner)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
Back to top