- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 19 for compareAndSet (0.19 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 14.6K 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());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.3K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/AtomicLongMap.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 01 16:15:01 UTC 2024 - 14.1K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Jun 14 17:55:55 UTC 2024 - 10.3K bytes - Viewed (0) -
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.1K 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) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 10.1K 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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 30 16:15:19 UTC 2024 - 21.1K bytes - Viewed (0) -
guava/src/com/google/common/hash/BloomFilterStrategies.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 10 19:45:10 UTC 2022 - 10.7K bytes - Viewed (0) -
okhttp/src/main/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 Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 17.9K bytes - Viewed (0) -
src/main/java/jcifs/smb/SmbTreeImpl.java
Registered: Sun Nov 03 00:10:13 UTC 2024 - Last Modified: Thu Jan 05 13:06:39 UTC 2023 - 29.6K bytes - Viewed (0)