Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for compareAndSet (0.16 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

        check(executed.compareAndSet(false, true)) { "Already Executed" }
    
        timeout.enter()
        callStart()
        try {
          client.dispatcher.executed(this)
          return getResponseWithInterceptorChain()
        } finally {
          client.dispatcher.finished(this)
        }
      }
    
      override fun enqueue(responseCallback: Callback) {
        check(executed.compareAndSet(false, true)) { "Already Executed" }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        val newConnectionsNeeded: Int
    
        while (true) {
          val oldMap = this.addressStates
          val newMap = oldMap + (address to state)
          if (addressStatesUpdater.compareAndSet(this, oldMap, newMap)) {
            val oldPolicyMinimumConcurrentCalls = oldMap[address]?.policy?.minimumConcurrentCalls ?: 0
            newConnectionsNeeded = policy.minimumConcurrentCalls - oldPolicyMinimumConcurrentCalls
    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)
Back to top