- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 20 for compareAndSet (0.09 sec)
-
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
for (int i = 0; i < 10; i++) { int expectedCount = i; list.add( new Runnable() { @Override public void run() { integer.compareAndSet(expectedCount, expectedCount + 1); } }, directExecutor()); } list.execute(); assertEquals(10, integer.get()); }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 4.7K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/JdkFutureAdapters.java
executionList.add(listener, exec); // When a listener is first added, we run a task that will wait for the delegate to finish, // and when it is done will run the listeners. if (hasListeners.compareAndSet(false, true)) { if (delegate.isDone()) { // If the delegate is already done, run the execution list immediately on the current // thread. executionList.execute();
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Jul 17 15:26:41 UTC 2025 - 7.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 17.8K bytes - Viewed (0) -
android/guava/src/com/google/common/util/concurrent/ExecutionSequencer.java
executingTaskQueue.thread = null; } } private boolean trySetStarted() { return compareAndSet(NOT_RUN, STARTED); } private boolean trySetCancelled() { return compareAndSet(NOT_RUN, CANCELLED); } }
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 22.1K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 20.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/thumbnail/impl/CommandGenerator.java
if (logger.isDebugEnabled()) { logger.debug("Process {} is not alive.", p); } return; } if (executed.compareAndSet(false, true)) { if (logger.isDebugEnabled()) { logger.debug("Interrupting a stream thread."); } ist.interrupt();
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Fri Jul 18 14:34:06 UTC 2025 - 14.7K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jun 03 17:10:08 UTC 2025 - 16.1K 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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 97.8K bytes - Viewed (0) -
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 Sep 05 12:43:10 UTC 2025 - Last Modified: Wed Jul 23 15:26:56 UTC 2025 - 98.1K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 113.6K bytes - Viewed (0)