- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 13 for compareAndSet (0.23 seconds)
-
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());
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Fri Mar 13 13:01:07 GMT 2026 - 7.3K bytes - Click Count (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 <aCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 7.2K bytes - Click Count (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 currentCreated: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Jan 29 22:14:05 GMT 2026 - 8.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/Tags.kt
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 3.9K bytes - Click Count (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(seenExceptionsField); } return seenExceptionsLocal; }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Aug 07 16:05:33 GMT 2025 - 8.5K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
} public void testOrdering() throws Exception { AtomicInteger integer = new AtomicInteger(); for (int i = 0; i < 10; i++) { int expectedCount = i; list.add(() -> integer.compareAndSet(expectedCount, expectedCount + 1), directExecutor()); } list.execute(); assertEquals(10, integer.get()); } private static final class MockRunnable implements Runnable {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (0) -
api/maven-api-model/src/main/java/org/apache/maven/api/model/ModelObjectProcessor.java
} ModelObjectProcessor processor = ProcessorHolder.CACHED_PROCESSOR.get(); if (processor == null) { processor = loadProcessor(); ProcessorHolder.CACHED_PROCESSOR.compareAndSet(null, processor); processor = ProcessorHolder.CACHED_PROCESSOR.get(); } return processor.process(object); } /** * Load the first available processor implementation.Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Mon Sep 29 14:45:25 GMT 2025 - 4.3K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/BasePublicSuffixList.kt
} } finally { readCompleteLatch.countDown() } } abstract fun listSource(): Source override fun ensureLoaded() { if (!listRead.get() && listRead.compareAndSet(false, true)) { readTheListUninterruptibly() } else { try { readCompleteLatch.await() } catch (_: InterruptedException) {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jul 28 07:33:49 GMT 2025 - 3.6K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionListTest.java
} public void testOrdering() throws Exception { AtomicInteger integer = new AtomicInteger(); for (int i = 0; i < 10; i++) { int expectedCount = i; list.add(() -> integer.compareAndSet(expectedCount, expectedCount + 1), directExecutor()); } list.execute(); assertEquals(10, integer.get()); } private static final class MockRunnable implements Runnable {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 4.4K bytes - Click Count (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. */ final void threadRecordFailure(Throwable t) { threadFailure.compareAndSet(null, t); } /** * Extra checks that get done for all test cases. * * <p>Triggers test case failure if any thread assertions have failed, by rethrowing, in the test
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 8.8K bytes - Click Count (0)