Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for compareAndSet (0.08 sec)

  1. guava-tests/test/com/google/common/util/concurrent/AtomicDoubleArrayTest.java

          for (double x : VALUES) {
            assertBitEquals(prev, aa.get(i));
            assertFalse(aa.compareAndSet(i, unused, x));
            assertBitEquals(prev, aa.get(i));
            assertTrue(aa.compareAndSet(i, prev, x));
            assertBitEquals(x, aa.get(i));
            prev = x;
          }
        }
      }
    
      /** compareAndSet in one thread enables another waiting for value to succeed */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 14.6K 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. guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java

       * @param update the new value
       * @return true if successful. False return indicates that the actual value was not equal to the
       *     expected value.
       */
      public final boolean compareAndSet(int i, double expect, double update) {
        return longs.compareAndSet(i, doubleToRawLongBits(expect), doubleToRawLongBits(update));
      }
    
      /**
       * Atomically sets the element at position {@code i} to the given updated value if the current
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  5. 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)
  6. android/guava/src/com/google/common/hash/BloomFilterStrategies.java

          long newValue;
          do {
            oldValue = data.get(longIndex);
            newValue = oldValue | mask;
            if (oldValue == newValue) {
              return false;
            }
          } while (!data.compareAndSet(longIndex, oldValue, newValue));
    
          // We turned the bit on, so increment bitCount.
          bitCount.increment();
          return true;
        }
    
        boolean get(long bitIndex) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Dec 22 03:38:46 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/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" }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:30:11 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java

            executingTaskQueue.thread = null;
          }
        }
    
        private boolean trySetStarted() {
          return compareAndSet(NOT_RUN, STARTED);
        }
    
        private boolean trySetCancelled() {
          return compareAndSet(NOT_RUN, CANCELLED);
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 23 15:26:56 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  9. guava/src/com/google/common/util/concurrent/Striped.java

          if (existing != null) {
            return existing;
          }
          L created = supplier.get();
          ArrayReference<L> newRef = new ArrayReference<>(created, index, queue);
          while (!locks.compareAndSet(index, existingRef, newRef)) {
            // we raced, we need to re-read and try again
            existingRef = locks.get(index);
            existing = existingRef == null ? null : existingRef.get();
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/thumbnail/impl/CommandGenerator.java

                    if (logger.isDebugEnabled()) {
                        logger.debug("Process {} is not alive.", p);
                    }
                    return;
                }
    
                if (executed.compareAndSet(false, true)) {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Interrupting a stream thread.");
                    }
                    ist.interrupt();
    
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Fri Jul 18 14:34:06 UTC 2025
    - 14.7K bytes
    - Viewed (0)
Back to top