- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for compareAndSet (0.28 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java
assertBitEquals(x, at.doubleValue()); } } /** compareAndSet treats +0.0 and -0.0 as distinct values */ public void testDistinctZeros() { AtomicDouble at = new AtomicDouble(+0.0); assertFalse(at.compareAndSet(-0.0, 7.0)); assertFalse(at.weakCompareAndSet(-0.0, 7.0)); assertBitEquals(+0.0, at.get()); assertTrue(at.compareAndSet(+0.0, -0.0)); assertBitEquals(-0.0, at.get());
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 6.9K bytes - Viewed (0) -
android/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 */
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 10K bytes - Viewed (0) -
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 */
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 14.5K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 14.1K bytes - Viewed (0) -
android/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
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Apr 04 09:45:04 GMT 2023 - 8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/AtomicDoubleTest.java
assertBitEquals(x, at.doubleValue()); } } /** compareAndSet treats +0.0 and -0.0 as distinct values */ public void testDistinctZeros() { AtomicDouble at = new AtomicDouble(+0.0); assertFalse(at.compareAndSet(-0.0, 7.0)); assertFalse(at.weakCompareAndSet(-0.0, 7.0)); assertBitEquals(+0.0, at.get()); assertTrue(at.compareAndSet(+0.0, -0.0)); assertBitEquals(-0.0, at.get());
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 10.2K bytes - Viewed (0) -
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) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Sep 29 21:34:48 GMT 2023 - 9.9K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AtomicDouble.java
* @return {@code true} if successful. False return indicates that the actual value was not * bitwise equal to the expected value. */ public final boolean compareAndSet(double expect, double update) { return value.compareAndSet(doubleToRawLongBits(expect), doubleToRawLongBits(update)); } /** * Atomically sets the value to the given updated value if the current value is <a
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Feb 28 21:00:54 GMT 2022 - 7.2K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/ConcurrentHashMultiset.java
* AtomicInteger's atomic operations, with some help from ConcurrentMap's atomic operations on * creation and removal (including automatic removal of zeroes). If the modification of an * AtomicInteger results in zero, we compareAndSet the value to zero; if that succeeds, we remove * the entry from the Map. If another operation sees a zero in the map, it knows that the entry is
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 21:19:52 GMT 2024 - 20.9K bytes - Viewed (0) -
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(seenExceptions); } return seenExceptionsLocal; }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Dec 14 20:35:03 GMT 2023 - 8.5K bytes - Viewed (0)