Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for init (0.16 sec)

  1. okhttp/src/test/java/okhttp3/internal/concurrent/TaskRunnerTest.kt

        assertThat(log).containsExactly("red:run@100000", "blue:run@200000")
        assertThat(taskFaker.executeCallCount).isEqualTo(2)
    
        taskFaker.assertNoMoreTasks()
      }
    
      private val Int.µs: Long
        get() = this * 1_000L
    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)
  2. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

      ) : AbstractQueue<T>(), BlockingQueue<T> {
        override val size: Int = delegate.size
    
        private var editCount = 0
    
        override fun poll(): T = delegate.poll()
    
        override fun poll(
          timeout: Long,
          unit: TimeUnit,
        ): T? {
          taskRunner.lock.withLock {
            val waitUntil = nanoTime + unit.toNanos(timeout)
            while (true) {
              val result = poll()
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskRunner.kt

        )
      }
    
      class RealBackend(threadFactory: ThreadFactory) : Backend {
        val executor =
          ThreadPoolExecutor(
            // corePoolSize:
            0,
            // maximumPoolSize:
            Int.MAX_VALUE,
            // keepAliveTime:
            60L,
            TimeUnit.SECONDS,
            SynchronousQueue(),
            threadFactory,
          )
    
        override fun nanoTime() = System.nanoTime()
    
    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)
Back to top