Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for initQueue (0.19 sec)

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

      internal var nextExecuteNanoTime = -1L
    
      /** Returns the delay in nanoseconds until the next execution, or -1L to not reschedule. */
      abstract fun runOnce(): Long
    
      internal fun initQueue(queue: TaskQueue) {
        if (this.queue === queue) return
    
        check(this.queue === null) { "task is in multiple queues" }
        this.queue = queue
      }
    
      override fun toString(): String = name
    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

      /** Adds [task] to run in [delayNanos]. Returns true if the coordinator is impacted. */
      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.
    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)
Back to top