Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for compareAndSet (0.4 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. android/guava/src/com/google/common/util/concurrent/AbstractFuture.java

            AbstractFuture<?> future, @CheckForNull Waiter expect, @CheckForNull Waiter update) {
          return waitersUpdater.compareAndSet(future, expect, update);
        }
    
        @Override
        boolean casListeners(AbstractFuture<?> future, @CheckForNull Listener expect, Listener update) {
          return listenersUpdater.compareAndSet(future, expect, update);
        }
    
        /** Performs a GAS operation on the {@link #listeners} field. */
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 22 21:17:24 GMT 2024
    - 63K 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