Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for task (0.16 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      /** How many times a new task has been started. Guarded by [TaskRunner.lock]. */
      private var contextSwitchCount = 0
    
      /** Guarded by [TaskRunner.lock]. */
      private var activeThreads = 0
    
      /** A task runner that posts tasks to this fake. Tasks won't be executed until requested. */
      val taskRunner: TaskRunner =
        TaskRunner(
          object : TaskRunner.Backend {
            override fun execute(
              taskRunner: TaskRunner,
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

          startAnotherThread()
        }
      }
    
      private fun beforeRun(task: Task) {
        lock.assertHeld()
    
        task.nextExecuteNanoTime = -1L
        val queue = task.queue!!
        queue.futureTasks.remove(task)
        readyQueues.remove(queue)
        queue.activeTask = task
        busyQueues.add(queue)
      }
    
      private fun runTask(task: Task) {
        val currentThread = Thread.currentThread()
    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)
  3. docs/changelogs/changelog_4x.md

     *  New: Share threads more aggressively between OkHttp's HTTP/2 connections, connection pool,
        web sockets, and cache. OkHttp has a new internal task runner abstraction for managed task
        scheduling. In your debugger you will see new thread names and more use of daemon threads.
    
     *  Fix: Don't drop callbacks on unexpected exceptions. When an interceptor throws an unchecked
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

      private val cleanupQueue: TaskQueue = taskRunner.newQueue()
      private val cleanupTask =
        object : Task("$okHttpName ConnectionPool connection closer") {
          override fun runOnce(): Long = closeConnections(System.nanoTime())
        }
    
      private fun AddressState.scheduleOpener() {
        queue.schedule(
          object : Task("$okHttpName ConnectionPool connection opener") {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private val key: String
    
      /** Non-null for client web sockets. These can be canceled. */
      internal var call: Call? = null
    
      /** This task processes the outgoing queues. Call [runWriter] to after enqueueing. */
      private var writerTask: Task? = null
    
      /** Null until this web socket is connected. Only accessed by the reader thread. */
      private var reader: WebSocketReader? = null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

         *
         * Since we can't ACK settings on the current reader thread (the reader thread can't write) we
         * execute all peer settings logic on the writer thread. This relies on the fact that the
         * writer task queue won't reorder tasks; otherwise settings could be applied in the opposite
         * order than received.
         */
        fun applyAndAckSettings(
          clearPrevious: Boolean,
          settings: Settings,
        ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

    class ConnectionPoolTest {
      private val routePlanner = FakeRoutePlanner()
      private val factory = routePlanner.factory
      private val taskFaker = routePlanner.taskFaker
      private val peer = MockHttp2Peer()
    
      /** The fake task runner prevents the cleanup runnable from being started.  */
      private val addressA = factory.newAddress("a")
      private val routeA1 = factory.newRoute(addressA)
      private val addressB = factory.newAddress("b")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

          "FINE: Q10000 scheduled after 100 µs: task",
          "FINE: Q10000 starting              : task",
          "FINE: Q10000 run again after  50 µs: task",
          "FINE: Q10000 finished run in   0 µs: task",
          "FINE: Q10000 starting              : task",
          "FINE: Q10000 run again after 150 µs: task",
          "FINE: Q10000 finished run in   0 µs: task",
          "FINE: Q10000 starting              : task",
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 23K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

    import java.io.Flushable
    import java.io.IOException
    import okhttp3.internal.assertThreadHoldsLock
    import okhttp3.internal.cache.DiskLruCache.Editor
    import okhttp3.internal.closeQuietly
    import okhttp3.internal.concurrent.Task
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.deleteContents
    import okhttp3.internal.deleteIfExists
    import okhttp3.internal.isCivilized
    import okhttp3.internal.okHttpName
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

        in 'a'..'f' -> this - 'a' + 10
        in 'A'..'F' -> this - 'A' + 10
        else -> -1
      }
    
    internal infix fun Byte.and(mask: Int): Int = toInt() and mask
    
    internal infix fun Short.and(mask: Int): Int = toInt() and mask
    
    internal infix fun Int.and(mask: Long): Long = toLong() and mask
    
    @Throws(IOException::class)
    internal fun BufferedSink.writeMedium(medium: Int) {
      writeByte(medium.ushr(16) and 0xff)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
Back to top