- Sort Score
- Num 10 results
- Language All
Results 1 - 5 of 5 for activeQueues (0.13 seconds)
-
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
} /** * Returns a snapshot of queues that currently have tasks scheduled. The task runner does not * necessarily track queues that have no tasks scheduled. */ fun activeQueues(): List<TaskQueue> { this.withLock { return busyQueues + readyQueues } } fun cancelAll() { assertLockHeld() for (i in busyQueues.size - 1 downTo 0) {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Aug 30 11:30:11 GMT 2025 - 10.4K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
} } } private fun ensureAllTaskQueuesIdle() { val entryTime = System.nanoTime() for (queue in TaskRunner.INSTANCE.activeQueues()) { // We wait at most 1 second, so we don't ever turn multiple lost threads into // a test timeout failure. val waitTime = (entryTime + 1_000_000_000L - System.nanoTime())Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Nov 04 19:13:52 GMT 2025 - 10.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/concurrent/TaskRunnerTest.kt
// Do nothing. } taskFaker.advanceUntil(0.µs) assertThat(taskRunner.activeQueues()).containsExactly(redQueue, blueQueue) taskFaker.advanceUntil(100.µs) assertThat(taskRunner.activeQueues()).containsExactly(blueQueue) taskFaker.advanceUntil(200.µs) assertThat(taskRunner.activeQueues()).isEmpty() taskFaker.assertNoMoreTasks()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Feb 03 22:17:59 GMT 2026 - 23K bytes - Click Count (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt
maxElements: Int, ) = error("unsupported") } /** Returns true if no tasks have been scheduled. This runs the coordinator for confirmation. */ fun isIdle() = taskRunner.activeQueues().isEmpty() override fun close() { tasksExecutor.shutdownNow() } companion object { var instance = 0 }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 11.9K bytes - Click Count (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
// Cause acceptConnections() to break out. serverSocket.closeQuietly() // Await shutdown. for (queue in taskRunner.activeQueues()) { if (!queue.idleLatch().await(5, TimeUnit.SECONDS)) { throw AssertionError("Gave up waiting for queue to shut down") } } taskRunnerBackend.shutdown() }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 40.3K bytes - Click Count (0)