Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for compareAndSet (0.06 sec)

  1. src/main/java/jcifs/util/SimpleCircuitBreaker.java

            if (current == State.OPEN) {
                long timeSinceLastFailure = System.currentTimeMillis() - lastFailureTime.get();
                if (timeSinceLastFailure > timeoutMillis) {
                    if (state.compareAndSet(State.OPEN, State.HALF_OPEN)) {
                        stateChangeTime.set(System.currentTimeMillis());
                        halfOpenSuccesses.set(0);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 11.3K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

         * interrupt, yet it will still run, since interruptTask will leave the runner value null,
         * allowing the CAS below to succeed.
         */
        Thread currentThread = Thread.currentThread();
        if (!compareAndSet(null, currentThread)) {
          return; // someone else has run or is running.
        }
    
        boolean run = !isDone();
        T result = null;
        Throwable error = null;
        try {
          if (run) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 10K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AbstractFutureState.java

            AbstractFutureState<?> future, @Nullable Waiter expect, @Nullable Waiter update) {
          return waitersUpdater.compareAndSet(future, expect, update);
        }
    
        @Override
        boolean casListeners(
            AbstractFutureState<?> future, @Nullable Listener expect, Listener update) {
          return listenersUpdater.compareAndSet(future, expect, update);
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java

            AbstractFutureState<?> future, @Nullable Waiter expect, @Nullable Waiter update) {
          return waitersUpdater.compareAndSet(future, expect, update);
        }
    
        @Override
        boolean casListeners(
            AbstractFutureState<?> future, @Nullable Listener expect, Listener update) {
          return listenersUpdater.compareAndSet(future, expect, update);
        }
    
        @Override
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

           * other callers have added to it.
           *
           * This read is guaranteed to get us the right value because we only set this once (here).
           *
           * requireNonNull is safe because either our compareAndSet succeeded or it failed because
           * another thread did it for us.
           */
          seenExceptionsLocal = requireNonNull(seenExceptionsField);
        }
        return seenExceptionsLocal;
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  6. src/main/java/jcifs/util/AuthenticationRateLimiter.java

            long windowStart = currentWindowStart.get();
    
            // Check if we need to reset the window (1 minute window)
            if (now - windowStart > 60000) {
                currentWindowStart.compareAndSet(windowStart, now);
                globalAttemptsInCurrentWindow.set(0);
            }
    
            int attempts = globalAttemptsInCurrentWindow.incrementAndGet();
            return attempts <= maxGlobalAttemptsPerMinute;
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/BasePublicSuffixList.kt

          }
        } finally {
          readCompleteLatch.countDown()
        }
      }
    
      abstract fun listSource(): Source
    
      override fun ensureLoaded() {
        if (!listRead.get() && listRead.compareAndSet(false, true)) {
          readTheListUninterruptibly()
        } else {
          try {
            readCompleteLatch.await()
          } catch (_: InterruptedException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  8. src/main/java/jcifs/smb/SmbSessionImpl.java

                log.trace("Acquire session " + usage + " " + this);
            }
    
            if (usage == 1) {
                synchronized (this) {
                    if (this.transportAcquired.compareAndSet(false, true)) {
                        log.debug("Reacquire transport");
                        this.transport.acquire();
                    }
                }
            }
    
            return this;
        }
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 68.9K bytes
    - Viewed (0)
  9. src/main/java/jcifs/util/SmbCircuitBreaker.java

            while (responseTimeMs < currentMin) {
                if (minResponseTime.compareAndSet(currentMin, responseTimeMs)) {
                    break;
                }
                currentMin = minResponseTime.get();
            }
    
            long currentMax = maxResponseTime.get();
            while (responseTimeMs > currentMax) {
                if (maxResponseTime.compareAndSet(currentMax, responseTimeMs)) {
                    break;
                }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 30 05:58:03 UTC 2025
    - 33.4K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbTreeImpl.java

                }
            }
    
            if (usage == 1) {
                synchronized (this) {
                    if (this.sessionAcquired.compareAndSet(false, true)) {
                        log.debug("Reacquire session");
                        this.session.acquire();
                    }
                }
            }
            return this;
        }
    
        /**
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sun Aug 31 08:00:57 UTC 2025
    - 30K bytes
    - Viewed (0)
Back to top