Hi,

Moving cleanNextPending to the CleanerImpl is ok but exposes more of the CleanerImpl
to the rest of java.base internals; loosing a bit of encapsulation.

As for the calls to Reference.tryHandlePending(false), the existing code in Bits to reserveMemory
is called on arbitrary threads (whoever was creating a Direct-X-Buffer).

The additional call in the cleanNextPending is in the same thread context and helps
cleaning and reference processing occur sooner.

Roger


On 2/23/2016 9:28 PM, Mandy Chung wrote:
On Feb 23, 2016, at 3:22 PM, Kim Barrett <kim.barr...@oracle.com> wrote:

I'm not sure what to do about any of this; I'm just feeling like maybe
the proposed API / implementation isn't quite right yet.
I suggest restore the JavaLangRefAccess used by direct byte buffer code and 
revisit such explicit mechanism until there is a need.

Another concern is that this method gets to run in any arbitrary thread rather 
than the dedicated reference handler thread / cleaner thread.

Mandy

Reply via email to