Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 54 for task (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/concurrent/Task.kt

     * decide not to by returning -1L.
     *
     * Task Queues
     * -----------
     *
     * Tasks are bound to the [TaskQueue] they are scheduled in. Each queue is sequential and the tasks
     * within it never execute concurrently. It is an error to use a task in multiple queues.
     */
    abstract class Task(
      val name: String,
      val cancelable: Boolean = true,
    ) {
      // Guarded by the TaskRunner.
      internal var queue: TaskQueue? = null
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

       * is running when that time is reached, that task is allowed to complete before this task is
       * started. Similarly the task will be delayed if the host lacks compute resources.
       *
       * @throws RejectedExecutionException if the queue is shut down and the task is not cancelable.
       */
      fun schedule(
        task: Task,
        delayNanos: Long = 0L,
      ) {
        taskRunner.lock.withLock {
          if (shutdown) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      /**
       * True if this task faker has ever had multiple tasks scheduled to run concurrently. Guarded by
       * [taskRunner].
       */
      var isParallel = false
    
      /** Guarded by [taskRunner]. */
      var nanoTime = 0L
        private set
    
      /** Backlog of tasks to run. Only one task runs at a time. Guarded by [taskRunner]. */
      private val serialTaskQueue = ArrayDeque<SerialTask>()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        }
      }
    
      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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

        duration: Long,
        unit: TimeUnit,
      ) = apply {
        actions += { Thread.sleep(unit.toMillis(duration)) }
      }
    
      override fun handle(stream: Stream) {
        val task = serviceStreamTask(stream)
        results.add(task)
        task.run()
      }
    
      /** Returns a task that processes both request and response from [stream]. */
      private fun serviceStreamTask(stream: Stream): FutureTask<Void> {
        return FutureTask<Void> {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt

      }
    
      @Test fun taskFailsWithUncheckedException() {
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(100)) {
          log.put("failing task running")
          throw RuntimeException("boom!")
        }
    
        queue.schedule("task", TimeUnit.MILLISECONDS.toNanos(200)) {
          log.put("normal task running")
          return@schedule -1L
        }
    
        queue.idleLatch().await(500, TimeUnit.MILLISECONDS)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

    import java.io.IOException
    import java.util.concurrent.CopyOnWriteArrayList
    import java.util.concurrent.LinkedBlockingDeque
    import java.util.concurrent.TimeUnit
    import okhttp3.internal.concurrent.Task
    import okhttp3.internal.concurrent.TaskRunner
    import okhttp3.internal.connection.RoutePlanner.ConnectResult
    import okhttp3.internal.connection.RoutePlanner.Plan
    import okhttp3.internal.okHttpName
    
    /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  8. regression-test/README.md

    01-01 12:53:32.818 10999 11090 D OkHttp  : [56 ms] callEnd
    ```
    
    3. Run tests using gradle
    
    ```
    $ ANDROID_SDK_ROOT=/Users/myusername/Library/Android/sdk ./gradlew :regression-test:connectedCheck
    ...
    > Task :regression-test:connectedDebugAndroidTest
    ...
    11:55:40 V/InstrumentationResultParser: Time: 13.271
    11:55:40 V/InstrumentationResultParser:
    11:55:40 V/InstrumentationResultParser: OK (12 tests)
    ...
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Nov 13 07:09:56 GMT 2020
    - 2.5K bytes
    - Viewed (0)
  9. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  10. docs/contribute/debug_logging.md

    [2020-01-01 00:00:00] << 0x00000003     0 DATA          END_STREAM
    [2020-01-01 00:00:00] << 0x00000000     8 GOAWAY
    [2020-01-01 00:00:05] << 0x00000000     8 GOAWAY
    ```
    
    ### Task Runner Logging 
    
    This logs task enqueues, starts, and finishes.
    
    ```
    [2020-01-01 00:00:00] Q10000 scheduled after   0 µs: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 starting              : OkHttp ConnectionPool
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 16:35:36 GMT 2022
    - 2.7K bytes
    - Viewed (0)
Back to top