- Sort Score
- Result 10 results
- Languages All
Results 21 - 28 of 28 for compareAndSet (0.08 sec)
-
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 Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 26 12:58:35 UTC 2024 - 20.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ConcurrentHashMultisetTest.java
} /** * Simulate some of the races that can happen on add. We can't easily simulate the race that * happens when an {@link AtomicInteger#compareAndSet} fails, but we can simulate the case where * the putIfAbsent returns a non-null value, and the case where the replace() of an observed zero * fails. */ public void testAdd_withFailures() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 14.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/publicsuffix/PublicSuffixDatabase.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt
val newConnectionsNeeded: Int while (true) { val oldMap = this.addressStates val newMap = oldMap + (address to state) if (addressStatesUpdater.compareAndSet(this, oldMap, newMap)) { val oldPolicyMinimumConcurrentCalls = oldMap[address]?.policy?.minimumConcurrentCalls ?: 0 newConnectionsNeeded = policy.minimumConcurrentCalls - oldPolicyMinimumConcurrentCalls
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 16.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
* test case failure. Only the first failure is recorded; subsequent calls to this method from * within the same test have no effect. */ public void threadRecordFailure(Throwable t) { threadFailure.compareAndSet(null, t); } @Override public void setUp() { setDelays(); } /** * Extra checks that get done for all test cases. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/JSR166TestCase.java
* test case failure. Only the first failure is recorded; subsequent calls to this method from * within the same test have no effect. */ public void threadRecordFailure(Throwable t) { threadFailure.compareAndSet(null, t); } @Override public void setUp() { setDelays(); } /** * Extra checks that get done for all test cases. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 37.9K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CacheTest.kt
val ifNoneMatch = AtomicReference<String?>() client = client.newBuilder() .addNetworkInterceptor( Interceptor { chain: Interceptor.Chain -> ifNoneMatch.compareAndSet(null, chain.request().header("If-None-Match")) chain.proceed(chain.request()) }, ) .build() // Confirm the value is cached and intercepted.
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 108.6K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ClosingFuture.java
"Expected state to be %s, but it was %s", oldState, newState); } private boolean compareAndUpdateState(State oldState, State newState) { return state.compareAndSet(oldState, newState); } // TODO(dpb): Should we use a pair of ArrayLists instead of an IdentityHashMap? private static final class CloseableList extends IdentityHashMap<AutoCloseable, Executor>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 08 19:36:35 UTC 2024 - 98.5K bytes - Viewed (0)