RFR: JDK-8149925 We don't need jdk.internal.ref.Cleaner any more

Peter Levart peter.levart at gmail.com
Thu Feb 25 09:17:25 UTC 2016


Hi Alan,

On 02/25/2016 09:00 AM, Alan Bateman wrote:
>
>
> On 25/02/2016 07:24, Peter Levart wrote:
>> :
>>
>> I kept the public boolean Cleaner.cleanNextPending() method which now 
>> only deals with enqueued Cleanable(s). I think this method might 
>> still be beneficial for public use in situations where cleanup 
>> actions take relatively long time to execute so that the rate of 
>> cleanup falls behind the rate of registration of new cleanup actions.
> I think we need also need to look at the option where this is not 
> public. I have concerns that it is exposing implementation to some 
> extent and that may become an attractive nuisance in the future. This 
> shouldn't be an issue for the NIO buffer usage, we can keep the usage 
> via the shared secrets mechanism. I think this is what Mandy is 
> suggesting too.
>
> -Alan.

Sure, no problem. Here's a variant that keeps the 
Cleaner.cleanNextPending() method private and exposed via SharedSecrets 
to nio Bits but is otherwise equivalent to webrev.06:

http://cr.openjdk.java.net/~plevart/jdk9-dev/removeInternalCleaner/webrev.06priv/

Regards, Peter




More information about the core-libs-dev mailing list