Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for CAs (0.01 sec)

  1. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

         * simple approach would be for each caller CAS it from null to a Set populated with its
         * exception. But there's another race: If the first thread fails with an exception and a second
         * thread immediately fails with the same exception:
         *
         * Thread1: calls setException(), which returns true, context switch before it can CAS
         * seenExceptionsField to its exception
         *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/util/concurrent/InterruptibleTask.java

    // Some Android 5.0.x Samsung devices have bugs in JDK reflection APIs that cause
    // getDeclaredField to throw a NoSuchFieldException when the field is definitely there.
    // Since this class only needs CAS on one field, we can avoid this bug by extending AtomicReference
    // instead of using an AtomicReferenceFieldUpdater. This reference stores Thread instances
    // and DONE/INTERRUPTED - they have a common ancestor of Runnable.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 10K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/util/concurrent/AbstractFutureState.java

         */
        Waiter(boolean unused) {}
    
        Waiter() {
          // avoid volatile write, write is made visible by subsequent CAS on waitersField field
          putThread(this, Thread.currentThread());
        }
    
        // non-volatile write to the next field. Should be made visible by a subsequent CAS on
        // waitersField.
        void setNext(@Nullable Waiter next) {
          putNext(this, next);
        }
    
        void unpark() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 33.2K bytes
    - Viewed (0)
  4. guava/src/com/google/common/util/concurrent/AbstractFutureState.java

         */
        Waiter(boolean unused) {}
    
        Waiter() {
          // avoid volatile write, write is made visible by subsequent CAS on waitersField field
          putThread(this, Thread.currentThread());
        }
    
        // non-volatile write to the next field. Should be made visible by a subsequent CAS on
        // waitersField.
        void setNext(@Nullable Waiter next) {
          putNext(this, next);
        }
    
        void unpark() {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 34.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/cache/LongAdder.java

          boolean uncontended = true;
          if ((hc = threadHashCode.get()) == null
              || as == null
              || (n = as.length) < 1
              || (a = as[(n - 1) & hc[0]]) == null
              || !(uncontended = a.cas(v = a.value, v + x))) retryUpdate(x, hc, uncontended);
        }
      }
    
      /** Equivalent to {@code add(1)}. */
      @Override
      public void increment() {
        add(1L);
      }
    
      /** Equivalent to {@code add(-1)}. */
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 5.6K bytes
    - Viewed (0)
Back to top