Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for atomically (0.03 sec)

  1. guava/src/com/google/common/util/concurrent/AtomicDouble.java

      }
    
      /**
       * Atomically sets to the given value and returns the old value.
       *
       * @param newValue the new value
       * @return the previous value
       */
      public final double getAndSet(double newValue) {
        long next = doubleToRawLongBits(newValue);
        return longBitsToDouble(updater.getAndSet(this, next));
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 9.5K bytes
    - Viewed (0)
  2. guava/src/com/google/common/util/concurrent/AtomicDoubleArray.java

      }
    
      /**
       * Atomically adds the given value to the element at index {@code i}.
       *
       * @param i the index
       * @param delta the value to add
       * @return the previous value
       */
      @CanIgnoreReturnValue
      public final double getAndAdd(int i, double delta) {
        return getAndAccumulate(i, delta, Double::sum);
      }
    
      /**
       * Atomically adds the given value to the element at index {@code i}.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Mar 17 20:26:29 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  3. guava/src/com/google/common/util/concurrent/AtomicLongMap.java

    import java.util.function.LongBinaryOperator;
    import java.util.function.LongUnaryOperator;
    import org.jspecify.annotations.Nullable;
    
    /**
     * A map containing {@code long} values that can be atomically updated. While writes to a
     * traditional {@code Map} rely on {@code put(K, V)}, the typical mechanism for writing to this map
     * is {@code addAndGet(K, long)}, which adds a {@code long} to the value currently associated with
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Aug 11 19:31:30 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/util/concurrent/AggregateFutureState.java

     * A helper which does some thread-safe operations for aggregate futures, which must be implemented
     * differently in GWT. Namely:
     *
     * <ul>
     *   <li>Lazily initializes a set of seen exceptions
     *   <li>Decrements a counter atomically
     * </ul>
     */
    @GwtCompatible
    @ReflectionSupport(value = ReflectionSupport.Level.FULL)
    abstract class AggregateFutureState<OutputT extends @Nullable Object>
        extends AbstractFuture.TrustedFuture<OutputT> {
      /*
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

           * This lock is used to ensure safe and correct cancellation, it ensures that a new task is
           * not scheduled while a cancel is ongoing. Also it protects the currentFuture variable to
           * ensure that it is assigned atomically with being scheduled.
           */
          private final ReentrantLock lock = new ReentrantLock();
    
          /** The future that represents the next execution of this task. */
          @GuardedBy("lock")
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.7K bytes
    - Viewed (0)
  6. guava/src/com/google/common/util/concurrent/AbstractScheduledService.java

           * This lock is used to ensure safe and correct cancellation, it ensures that a new task is
           * not scheduled while a cancel is ongoing. Also it protects the currentFuture variable to
           * ensure that it is assigned atomically with being scheduled.
           */
          private final ReentrantLock lock = new ReentrantLock();
    
          /** The future that represents the next execution of this task. */
          @GuardedBy("lock")
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Aug 09 01:14:59 UTC 2025
    - 27.8K bytes
    - Viewed (0)
  7. android/guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedPriorityBlockingQueue.java

          E e;
          while (n < maxElements && (e = q.poll()) != null) {
            c.add(e);
            ++n;
          }
          return n;
        } finally {
          monitor.leave();
        }
      }
    
      /**
       * Atomically removes all of the elements from this queue. The queue will be empty after this call
       * returns.
       */
      @Override
      public void clear() {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 18.9K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/collect/MapMaker.java

       * instance, so it can be invoked again to create multiple independent maps.
       *
       * <p>The bulk operations {@code putAll}, {@code equals}, and {@code clear} are not guaranteed to
       * be performed atomically on the returned map. Additionally, {@code size} and {@code
       * containsValue} are implemented as bulk read operations, and thus may fail to observe concurrent
       * writes.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 12.8K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

      public String toString() {
        Monitor monitor = this.monitor;
        monitor.enter();
        try {
          return super.toString();
        } finally {
          monitor.leave();
        }
      }
    
      /**
       * Atomically removes all of the elements from this queue. The queue will be empty after this call
       * returns.
       */
      @Override
      public void clear() {
        E[] items = this.items;
        Monitor monitor = this.monitor;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 22.4K bytes
    - Viewed (0)
  10. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

          }
        }
    
        /**
         * Apply inbound settings and send an acknowledgement to the peer that provided them.
         *
         * We need to apply the settings and ack them atomically. This is because some HTTP/2
         * implementations (nghttp2) forbid peers from taking advantage of settings before they have
         * acknowledged! In particular, we shouldn't send frames that assume a new `initialWindowSize`
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 31.8K bytes
    - Viewed (0)
Back to top