Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for compareAndSet (0.23 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/publicsuffix/PublicSuffixDatabase.kt

          return domainLabels.dropLast(1)
        }
    
        return domainLabels
      }
    
      private fun findMatchingRule(domainLabels: List<String>): List<String> {
        if (!listRead.get() && listRead.compareAndSet(false, true)) {
          readTheListUninterruptibly()
        } else {
          try {
            readCompleteLatch.await()
          } catch (_: InterruptedException) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.7K bytes
    - Viewed (0)
  3. 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)
  4. okhttp/src/test/java/okhttp3/CacheTest.kt

        val ifNoneMatch = AtomicReference<String?>()
        client =
          client.newBuilder()
            .addNetworkInterceptor(
              Interceptor { chain: Interceptor.Chain ->
                ifNoneMatch.compareAndSet(null, chain.request().header("If-None-Match"))
                chain.proceed(chain.request())
              },
            )
            .build()
    
        // Confirm the value is cached and intercepted.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top