History log of /libcore/luni/src/test/java/libcore/java/lang/ref/ReferenceQueueTest.java
Revision Date Author Comments
4d9ced850d6fbc052ccf062a3cf6f708fb4e4402 09-Dec-2015 Narayan Kamath <narayan@google.com> Let cleaners get cleaned again.

When cleaners are "enqueued" by the GC, their clean() method must
be called. They must not be enqueued on the dummy reference queue
they're associated with - nobody's waiting for them there.

Their clean method is run on the "ReferenceQueueDaemon" thread, and
can also be invoked by explicitly calling "enqueue" method inherited
from PhantomReference.

bug: 26014645

Change-Id: I2ec733f99a3606f3f69af0a22240b1ccd8c4fe7c
250e0d89cc3f5d2fc03ed23961c774c02f825ffd 20-Jul-2011 Jesse Wilson <jessewilson@google.com> Use nanoTime rather than currentTimeMillis in ReferenceQueue.remove()

Some other side effects of this change:
- we no longer make a time lookup when we don't need to
- we time out after 'n' milliseconds, not 'n+1' milliseconds
- we duplicate code from Thread.join(). I opened http://b/5053948 to dedup this.

Bug: http://b/5050245
Change-Id: I20375119cfa06be559b6aa5c209375b3d3a541f9