- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 26 for awaitClear (0.07 seconds)
-
android/guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java
* See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.testing.GcFinalization.awaitClear; import static com.google.common.truth.Truth.assertThat; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 1.8K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/ClosingFutureLeakTest.java
* See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.util.concurrent; import static com.google.common.testing.GcFinalization.awaitClear; import static com.google.common.truth.Truth.assertThat; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import com.google.common.annotations.GwtIncompatible;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Sat Mar 07 02:20:33 GMT 2026 - 1.8K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* WeakReference<Foo> weakRef = new WeakReference<>(x); * // ... use x ... * x = null; // Hint to the JIT that x is stack-unreachable * return weakRef; * } * public void testFooLeak() { * GcFinalization.awaitClear(fooWeakRef()); * } * } * * <p>This class cannot currently be used to test soft references, since this class does not try to * create the memory pressure required to cause soft references to be cleared. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
guava-testlib/src/com/google/common/testing/GcFinalization.java
* WeakReference<Foo> weakRef = new WeakReference<>(x); * // ... use x ... * x = null; // Hint to the JIT that x is stack-unreachable * return weakRef; * } * public void testFooLeak() { * GcFinalization.awaitClear(fooWeakRef()); * } * } * * <p>This class cannot currently be used to test soft references, since this class does not try to * create the memory pressure required to cause soft references to be cleared. *
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { WeakReference<Object> ref = createWeakReference(); GcFinalization.awaitClear(ref); assertThat(ref.get()).isNull(); } private WeakReference<Object> createWeakReference() { return new WeakReference<>(new Object()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 8.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java
import static com.google.common.io.FileBackedOutputStream.reachabilityFence; import static com.google.common.primitives.Bytes.concat; import static com.google.common.testing.GcFinalization.awaitClear; import static com.google.common.testing.GcFinalization.awaitDone; import static com.google.common.truth.Truth.assertThat; import static java.lang.Math.min; import static java.nio.file.attribute.PosixFilePermission.OWNER_READ;
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 03 04:04:26 GMT 2026 - 8K bytes - Click Count (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { WeakReference<Object> ref = createWeakReference(); GcFinalization.awaitClear(ref); assertThat(ref.get()).isNull(); } private WeakReference<Object> createWeakReference() { return new WeakReference<>(new Object()); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 16:11:48 GMT 2026 - 8.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/StripedTest.java
} public void testWeakImplementations() { for (Striped<?> striped : weakImplementations()) { WeakReference<Object> weakRef = getWeakReferenceToStripe(striped); GcFinalization.awaitClear(weakRef); } } private WeakReference<Object> getWeakReferenceToStripe(Striped<?> striped) { return new WeakReference<>(striped.get(new Object())); } public void testWeakReadWrite() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 8.1K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
} public void testWeakImplementations() { for (Striped<?> striped : weakImplementations()) { WeakReference<Object> weakRef = getWeakReferenceToStripe(striped); GcFinalization.awaitClear(weakRef); } } private WeakReference<Object> getWeakReferenceToStripe(Striped<?> striped) { return new WeakReference<>(striped.get(new Object())); } public void testWeakReadWrite() {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 8.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
assertThat(sepStopwatchA.get()).isNotNull(); // Clear all references to the Stopwatch and wait for it to be gc'd. sepStopwatchA.set(null); GcFinalization.awaitClear(sepStopwatchRef.get()); // Return a weak reference to the parallel ClassLoader. This is the reference that should // eventually become clear if there are no other references to the ClassLoader.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Feb 26 02:41:17 GMT 2026 - 7.7K bytes - Click Count (0)