- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for Task (0.32 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/concurrent/Task.kt
* * Recurrence * ---------- * * Tasks control their recurrence schedule. The [runOnce] function returns -1L to signify that the * task should not be executed again. Otherwise it returns a delay until the next execution. * * A task has at most one next execution. If the same task instance is scheduled multiple times, the * earliest one wins. This applies to both executions scheduled with [TaskRunner.Queue.schedule] and
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.4K bytes - Viewed (0) -
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, ) {
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) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
var nanoTime = 0L private set /** Backlog of tasks to run. Only one task runs at a time. Guarded by [TaskRunner.lock]. */ private val serialTaskQueue = ArrayDeque<SerialTask>() /** The task that's currently executing. Guarded by [TaskRunner.lock]. */ private var currentTask: SerialTask = TestThreadSerialTask /** The coordinator task if it's waiting, and how it will resume. Guarded by [TaskRunner.lock]. */
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) -
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) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.5K bytes - Viewed (0) -
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) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
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 May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.8K bytes - Viewed (0) -
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) -
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)