These changes look fine, but I believe ReferenceQueue can benefit from more work. - Instead of having a Lock subclass, just make lock a new Object() - Update the queue using the CAS capabilities from java.util.concurrent.atomic. But that would be an independent and more difficult fix.
While you're there, you could make the comments for SoftReference.clock and SoftReference.timestamp into proper javadoc comments (i.e. just add a '*' and some whitespace). Martin On Mon, Mar 23, 2009 at 10:57, Alan Bateman <alan.bate...@sun.com> wrote: > 6666739: (ref) ReferenceQueue.poll() doesn't scale well > 6711667: (ref) Update SoftReference timestamp only if clock advances > > This is forward-port from 6u14 of two scalability fixes. These were original > fixed by Tom Rodriguez in an earlier update. > > The webrev is here: > http://cr.openjdk.java.net/~alanb/6666739%2b6711667/webrev.00/ > > Thanks, > > Alan. > >