< prev index next >

src/java.base/share/classes/java/lang/ref/Cleaner.java

Print this page

        

*** 219,228 **** --- 219,238 ---- Objects.requireNonNull(action, "action"); return new CleanerImpl.PhantomCleanableRef(obj, this, action); } /** + * Processes next Cleanable that has been waiting in the queue. + * + * @return {@code true} if a Cleanable was found in the queue and + * was processed or {@code false} if the queue was empty. + */ + boolean cleanNextEnqueued() { + return impl.cleanNextEnqueued(); + } + + /** * {@code Cleanable} represents an object and a * cleaning action registered in a {@code Cleaner}. * @since 9 */ public interface Cleanable {
< prev index next >