- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for NewQueue (0.37 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt
if (plan is FailedPlan) return plan.result // Connect TCP asynchronously. tcpConnectsInFlight += plan val taskName = "$okHttpName connect ${routePlanner.address.url.redact()}" taskRunner.newQueue().schedule( object : Task(taskName) { override fun runOnce(): Long { val connectResult = try { plan.connectTcp() } catch (e: Throwable) {
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/test/java/okhttp3/internal/concurrent/TaskRunnerRealBackendTest.kt
} } 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 val delays = mutableListOf(TimeUnit.MILLISECONDS.toNanos(1000), -1L)
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) -
okhttp/src/test/java/okhttp3/internal/connection/FastFallbackExchangeFinderTest.kt
taskFaker.close() routePlanner.close() } @Test fun takeConnectedConnection() { val plan0 = routePlanner.addPlan() plan0.connectState = TLS_CONNECTED taskRunner.newQueue().execute("connect") { val result0 = finder.find() assertThat(result0).isEqualTo(plan0.connection) } taskFaker.runTasks() assertEvents( "take plan 0", )
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 20.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
/** Asynchronously writes frames to the outgoing socket. */ private val writerQueue = taskRunner.newQueue() /** Ensures push promise callbacks events are sent in order per stream. */ private val pushQueue = taskRunner.newQueue() /** Notifies the listener of settings changes. */ private val settingsListenerQueue = taskRunner.newQueue() /** User code to run in response to push promise events. */
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) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
lock.assertHeld() if (executeCallCount > runCallCount) return // A thread is still starting. executeCallCount++ backend.execute(this@TaskRunner, runnable) } fun newQueue(): TaskQueue { val name = lock.withLock { nextQueueName++ } return TaskQueue(this, "Q$name") } /** * Returns a snapshot of queues that currently have tasks scheduled. The task runner does not
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/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
) { internal val keepAliveDurationNs: Long = timeUnit.toNanos(keepAliveDuration) @Volatile private var addressStates: Map<Address, AddressState> = mapOf() private val cleanupQueue: TaskQueue = taskRunner.newQueue() private val cleanupTask = object : Task("$okHttpName ConnectionPool connection closer") { override fun runOnce(): Long = closeConnections(System.nanoTime()) }
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) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
// Reuse if the user specified a port serverSocket!!.reuseAddress = inetSocketAddress.port != 0 serverSocket!!.bind(inetSocketAddress, 50) portField = serverSocket!!.localPort taskRunner.newQueue().execute("MockWebServer $portField", cancelable = false) { try { logger.fine("$this starting to accept connections") acceptConnections() } catch (e: Throwable) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 37.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt
private val taskRunner = taskFaker.taskRunner private val log = mutableListOf<String>() private val redQueue = taskRunner.newQueue() private val blueQueue = taskRunner.newQueue() private val greenQueue = taskRunner.newQueue() @AfterEach internal fun tearDown() { taskFaker.close() } @Test fun executeDelayed() { redQueue.execute("task", 100.µs) {
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) -
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
private var writer: WebSocketWriter? = null /** Used for writes, pings, and close timeouts. */ private var taskQueue = taskRunner.newQueue() /** Names this web socket for observability and debugging. */ private var name: String? = null /** The streams held by this web socket. This is closed when both reader and writer are closed. */
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) -
okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt
* time an edit is committed. A snapshot is stale if its sequence number is not equal to its * entry's sequence number. */ private var nextSequenceNumber: Long = 0 private val cleanupQueue = taskRunner.newQueue() private val cleanupTask = object : Task("$okHttpName Cache") { override fun runOnce(): Long { synchronized(this@DiskLruCache) { if (!initialized || closed) {
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)