- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 26 for GcFinalization (0.21 sec)
-
guava-testlib/src/com/google/common/testing/GcFinalization.java
* }; * x = null; // Hint to the JIT that x is stack-unreachable * GcFinalization.await(latch); * }</pre> * * <p>Here's an example that uses a user-defined finalization predicate: * * <pre>{@code * final WeakHashMap<Object, Object> map = new WeakHashMap<>(); * map.put(new Object(), Boolean.TRUE); * GcFinalization.awaitDone(new FinalizationPredicate() { * public boolean isDone() {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* }; * x = null; // Hint to the JIT that x is stack-unreachable * GcFinalization.await(latch); * }</pre> * * <p>Here's an example that uses a user-defined finalization predicate: * * <pre>{@code * final WeakHashMap<Object, Object> map = new WeakHashMap<>(); * map.put(new Object(), Boolean.TRUE); * GcFinalization.awaitDone(new FinalizationPredicate() { * public boolean isDone() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 22 17:40:56 GMT 2024 - 11.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java
assertTrue(file.exists()); out.close(); // Make sure that finalize deletes the file out = null; // times out and throws RuntimeException on failure GcFinalization.awaitDone( new GcFinalization.FinalizationPredicate() { @Override public boolean isDone() { return !file.exists(); } }); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Jun 08 21:20:23 GMT 2023 - 1.7K bytes - Viewed (0) -
guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
} }; x = null; // Hint to the JIT that x is unreachable GcFinalization.awaitDone(future); assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { final WeakReference<Object> ref = new WeakReference<>(new Object()); GcFinalization.awaitClear(ref); assertNull(ref.get()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/GcFinalizationTest.java
} }; x = null; // Hint to the JIT that x is unreachable GcFinalization.awaitDone(future); assertTrue(future.isDone()); assertTrue(future.isCancelled()); } public void testAwaitClear() { final WeakReference<Object> ref = new WeakReference<>(new Object()); GcFinalization.awaitClear(ref); assertNull(ref.get()); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 7.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/FileBackedOutputStreamAndroidIncompatibleTest.java
assertTrue(file.exists()); out.close(); // Make sure that finalize deletes the file out = null; // times out and throws RuntimeException on failure GcFinalization.awaitDone( new GcFinalization.FinalizationPredicate() { @Override public boolean isDone() { return !file.exists(); } }); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Thu Jun 08 21:20:23 GMT 2023 - 1.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/StripedTest.java
import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Ordering; import com.google.common.collect.Sets; import com.google.common.testing.GcFinalization; import com.google.common.testing.NullPointerTester; import java.lang.ref.WeakReference; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Semaphore;
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Feb 09 22:57:07 GMT 2022 - 8.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FinalizableReferenceQueueClassLoaderUnloadingTest.java
import static com.google.common.base.StandardSystemProperty.PATH_SEPARATOR; import com.google.common.collect.ImmutableList; import com.google.common.testing.GcFinalization; import java.io.Closeable; import java.io.File; import java.lang.ref.WeakReference; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.net.MalformedURLException; import java.net.URL;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Feb 16 03:24:50 GMT 2021 - 13.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/EnumsTest.java
import com.google.common.annotations.J2ktIncompatible; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.google.common.testing.GcFinalization; import com.google.common.testing.NullPointerTester; import com.google.common.testing.SerializableTester; import java.io.File; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Tue Oct 03 20:10:02 GMT 2023 - 8.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/FuturesGetCheckedTest.java
import static com.google.common.util.concurrent.FuturesGetCheckedInputs.UNCHECKED_EXCEPTION; import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.assertThrows; import com.google.common.testing.GcFinalization; import com.google.common.util.concurrent.FuturesGetCheckedInputs.ExceptionWithBadConstructor; import com.google.common.util.concurrent.FuturesGetCheckedInputs.ExceptionWithGoodAndBadConstructor;
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 16.4K bytes - Viewed (0)