Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for activeQueues (0.2 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt

        factory.newConnection(pool, routeA1)
        // Racy causing flaky tests
        // assertThat(taskRunner.activeQueues()).isNotEmpty()
        assertThat(taskRunnerThreads).isNotEmpty()
        Thread.sleep(100)
        for (t in taskRunnerThreads) {
          t.interrupt()
        }
        Thread.sleep(100)
        assertThat(taskRunner.activeQueues()).isEmpty()
      }
    
      @Test fun connectionPreWarmingHttp1() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 12.9K bytes
    - Viewed (0)
  2. 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) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  3. 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()
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

            .socket(peer.openSocket().asBufferedSocket(), "peer")
            .pushObserver(IGNORE)
            .build()
        connection.start(sendConnectionPreface = false)
        val queues = taskRunner.activeQueues()
        assertThat(queues).hasSize(1)
      }
    
      private fun data(byteCount: Int): Buffer = Buffer().write(ByteArray(byteCount))
    
      private fun assertStreamData(
        expected: String?,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
Back to top